Public: anyone can read this; the crew can change it.

A Talk turn that reaches its limit says so and offers one tap to go on #17981

opened this

Merged 17h 13m ago, live in production

Most of this was already on main from #17827 and #17842. The one thing missing was the JSON field, so that is all I added. Already there: When a turn ends at its turn or token limit, the pane says "I stopped here because this turn reached its limit, so this is not finished." It shows one Go on form.

Notes

opened this

Most of this was already on main from #17827 and #17842. The one thing missing was the JSON field, so that is all I added.

Already there:

  • When a turn ends at its turn or token limit, the pane says "I stopped here because this turn reached its limit, so this is not finished." It shows one Go on form. Go on posts a fixed short prompt, Go on., through the existing message route, so the same-origin check is untouched.
  • It is one tap for one turn and never automatic. I added no cap.
  • The terminal already shows the same state (src/tui/screens/talk_chats.ts).
  • test/talk-limit.test.ts already covers the page: a cut-off turn renders the sentence and one button, a normal turn renders neither, and the flag is set only when the run ended on a limit.

Changed:

  • GET /api/v1/conversation/turns now returns stoppedAt: "limit" | null for the conversation.
  • It is "limit" when the newest turn, on the page without before, is an unreplaced agent reply that hit its limit. Each such turn also carries stoppedAt: "limit", which the Apple app can read.
  • The field is declared in the route's contract entry, getApiV1ConversationTurns.ts, and the contract and openapi tests (721) pass. It is not in src/contract/openapi/schemas/*, because that file has no schema for this reply.
  • A new test in test/talk-limit.test.ts checks the JSON after a cut-off reply, then checks it is null after a normal reply follows.

Checks:

  • tsc is clean and gate.ts raised nothing on the commit.
  • I did not run the dead-code, process-wide-state or timed-jobs tests, or the design lint. No page, export or module-level state was added.
  • The commit line says No door: because the terminal already shows the limit, and No look: because no page changed. No review block is needed.

Try it: open a conversation whose last turn hit its limit and call GET /api/v1/conversation/turns?conversation=<id>. The page at /talk/<id> shows the sentence and Go on.

🤖 Generated with Claude Code

Closes #17977

commented

Most of this was already on main from #17827 and #17842. The one thing missing was the JSON field, so that is all I added.

Already there:

  • When a turn ends at its turn or token limit, the pane says "I stopped here because this turn reached its limit, so this is not finished." It shows one Go on form. Go on posts a fixed short prompt, Go on., through the existing message route, so the same-origin check is untouched.
  • It is one tap for one turn and never automatic. I added no cap.
  • The terminal already shows the same state (src/tui/screens/talk_chats.ts).
  • test/talk-limit.test.ts already covers the page: a cut-off turn renders the sentence and one button, a normal turn renders neither, and the flag is set only when the run ended on a limit.

Changed:

  • GET /api/v1/conversation/turns now returns stoppedAt: "limit" | null for the conversation.
  • It is "limit" when the newest turn, on the page without before, is an unreplaced agent reply that hit its limit. Each such turn also carries stoppedAt: "limit", which the Apple app can read.
  • The field is declared in the route's contract entry, getApiV1ConversationTurns.ts, and the contract and openapi tests (721) pass. It is not in src/contract/openapi/schemas/*, because that file has no schema for this reply.
  • A new test in test/talk-limit.test.ts checks the JSON after a cut-off reply, then checks it is null after a normal reply follows.

Checks:

  • tsc is clean and gate.ts raised nothing on the commit.
  • I did not run the dead-code, process-wide-state or timed-jobs tests, or the design lint. No page, export or module-level state was added.
  • The commit line says No door: because the terminal already shows the limit, and No look: because no page changed. No review block is needed.

Try it: open a conversation whose last turn hit its limit and call GET /api/v1/conversation/turns?conversation=<id>. The page at /talk/<id> shows the sentence and Go on.

🤖 Generated with Claude Code

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs