Skip to content

docs(schema): let cancelled cover stops the user chose through the Agent - #2576

Merged
benbrandt merged 1 commit into
mainfrom
docs/cancelled-stop-reason
Oct 28, 2026
Merged

benbrandt merged 1 commit into
mainfrom
docs/cancelled-stop-reason

Conversation

@benbrandt

Copy link
Copy Markdown
Member

#2523 limited the v2 cancelled stop reason to session/cancel and closing the session. A user can also stop a turn through an interaction the Agent offers. For example, answering a plan-approval permission request with "No, keep planning" interrupts the turn so the user can give feedback. That is a user cancel, and reporting it as error would be wrong.

New wording:

  • cancelled: the user or Client chose to stop the work, via session/cancel, by closing the session, or through an interaction the Agent offers, such as a permission option that tells the Agent to stop.
  • Work the Agent stops for its own reasons still uses max_tokens, max_turn_requests, refusal or error.

Changed: the StopReason::Cancelled doc comment, the v2 prompt-lifecycle.mdx (stable and draft), and the regenerated schema and schema docs.

The v2 cancelled stop reason was limited to session/cancel and closing
the session. A user can also stop a turn through an interaction the Agent
offers, such as a permission option like "No, keep planning" that tells
the Agent to stop; that is a user cancel too, not an error. The reason
stays reserved against Agent-side limits and failures.
@benbrandt
benbrandt marked this pull request as ready for review October 28, 2026 12:10
@benbrandt
benbrandt requested a review from a team as a code owner October 28, 2026 12:10
@benbrandt
benbrandt merged commit 4939e66 into main Oct 28, 2026
14 checks passed
@benbrandt
benbrandt deleted the docs/cancelled-stop-reason branch October 28, 2026 12:10
@acp-release-bot acp-release-bot Bot mentioned this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant