Skip to content

fix: route stable session/resume and session/close - #159

Open
monody0007 wants to merge 1 commit into
agentclientprotocol:mainfrom
monody0007:oss-pilot/acp-stable-session-resume
Open

monody0007 wants to merge 1 commit into
agentclientprotocol:mainfrom
monody0007:oss-pilot/acp-stable-session-resume

Conversation

@monody0007

Copy link
Copy Markdown

Summary

The bundled stable schema includes session/resume and session/close, but the router still requires use_unstable_protocol. Agents advertising these capabilities return -32601 Method not found by default, and the HTTP/WebSocket servers cannot enable that flag.

This removes the stale gates, following the stable-method behavior established in #148. session/fork remains experimental.

HTTP resume also needs the same session-stream attachment as load: its response has no sessionId, so neither peer previously attached the stream and the next prompt returned 404. The client and server now share the load/resume attachment path, including failed-resume cleanup. Web-transport docs are updated.

Testing

  • Default-protocol lifecycle test and real loopback HTTP/WebSocket tests: failed resume, retry, prompt and agent callback.
  • Base: 3 new cases fail, 11 controls pass. Fixed source: all 14 pass.
  • Full pytest/doctest suite: 360 passed, 1 opt-in Gemini test skipped.
  • Five targeted mutations detected with a passing unmodified control.
  • make check: lock, all 10 hooks, type and dependency checks pass.
  • make docs-test: strict documentation build passes.

Session-close stream teardown is a pre-existing limitation outside this change. No schema regeneration is needed.

Implementation and independent review used AI assistance. The checks above were executed locally.

The bundled ACP v1 schema has listed session/resume and session/close as
stable since v0.12.2, but the agent router still required
use_unstable_protocol for them. Agents advertising
sessionCapabilities.resume/close answered "Method not found" by default,
and the HTTP/WebSocket servers offer no way to enable the flag.

Once routed, a resume over Streamable HTTP still could not continue:
its response carries no sessionId, so neither peer opened the session
SSE stream and the next session/prompt POST returned 404. Treat
session/resume like session/load when attaching session streams.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>

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