Skip to content

fix: align v2 cancel dispatch and session setup with ACP - #351

Merged
benbrandt merged 1 commit into
mainfrom
fix/v2-cancel-setup-errors
Nov 18, 2026
Merged

benbrandt merged 1 commit into
mainfrom
fix/v2-cancel-setup-errors

Conversation

@benbrandt

Copy link
Copy Markdown
Member

Summary

Align the v2 runtime and example with the ACP clarifications after the schema v2.0.0-alpha.17 release.

  • Remove the default error override for tool_call/cancel and terminal/cancel. An unimplemented method returns -32601. When the method is implemented, its handler distinguishes an unknown or inactive session (-32002 with data.sessionId) from an invalid, final, or non-cancellable item (-32602). Typed handlers and wildcard handlers still run normally. See ACP #2869.
  • Document that a non-idle session/new state is sent after the response and that an unsupported systemPrompt value is rejected with -32602 without creating or resuming the session. Teach the dual-version example to reject unsupported v2 system prompts and test that both operations leave session state unchanged. See ACP #2870 and ACP #2871.
  • Regenerate the stable v2 bindings. No schema or ACP v1 changes.

Verification

  • npm run check: generated-file checks, lint, formatting, spelling, typecheck, build, package checks, 687 tests, and TypeDoc verification.
  • git diff --check

@benbrandt
benbrandt enabled auto-merge (squash) November 18, 2026 15:42
@benbrandt
benbrandt merged commit 7710449 into main Nov 18, 2026
6 checks passed
@benbrandt
benbrandt deleted the fix/v2-cancel-setup-errors branch November 18, 2026 15:44
benbrandt added a commit that referenced this pull request Nov 18, 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