Skip to content

docs(v1): require the cancelled stop reason in Rust cancellation docs - #3042

Open
connorburgess wants to merge 1 commit into
agentclientprotocol:mainfrom
connorburgess:cb/v1-cancelled-stop-reason-wording
Open

connorburgess wants to merge 1 commit into
agentclientprotocol:mainfrom
connorburgess:cb/v1-cancelled-stop-reason-wording

Conversation

@connorburgess

Copy link
Copy Markdown

The v1 Prompt Turn page says that after session/cancel the Agent MUST respond to the original session/prompt request with the cancelled stop reason, and MUST catch errors raised by aborted operations so that Clients can reliably confirm the cancellation.

The Rust docs for the same behavior are weaker, and they are published in the v1 JSON Schema descriptions and the schema reference page:

  • StopReason::Cancelled says the stop reason MUST be returned, then that Agents SHOULD catch those exceptions.
  • The session/cancel notification lists responding with cancelled among the things the Agent SHOULD do.

Use MUST for both, as the stable page and the v2 Rust docs already do. Stopping model requests and tool calls stays SHOULD, as on the page.

This changes requirement keywords in Rust comments to match the stable page. The page itself is not changed, and there are no wire or type changes. Schemas and reference pages are regenerated with npm run generate.

Validation on 8b8532e (local results):

  • npm run check: passes Clippy, formatting, spellcheck, Rust tests and schema tests.

The Prompt Turn page says the Agent MUST respond to the original
session/prompt request with the cancelled stop reason after a
session/cancel, and MUST catch errors raised by aborted operations so
that Clients can reliably confirm the cancellation.

The Rust docs for the same behavior were weaker. The Cancelled stop
reason said MUST be returned and then that Agents SHOULD catch those
exceptions, and the session/cancel notification listed the cancelled
response among things the Agent SHOULD do. Those comments are published
in the v1 JSON Schema descriptions and the schema reference page.

Use MUST for both, as the stable page and the v2 Rust docs already do.
Stopping model requests and tool calls stays SHOULD, as on the page.
Regenerated schemas and reference pages; no wire or type changes.
@connorburgess
connorburgess requested a review from a team as a code owner December 5, 2026 07:46
@mintlify

mintlify Bot commented Dec 5, 2026

Copy link
Copy Markdown

Preview approval required

This pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit 8b8532e.

Approve preview

This branch has not been deployed

No deployments
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