Repository navigation
feat(unstable): add session/status method - #2735
Merged
Merged
Conversation
Add schema support for the session-status RFD behind the new `unstable_session_status` feature, in both v1 and v2: - `session/status` request with a required `sessionId` - response with a required, open `status` (`open` or `saved`, unknown values treated as `saved`) - in v2, an optional `state` foreground snapshot reusing `StateUpdate` - `sessionCapabilities.status` (v1) / `session.status` (v2) capability - draft overview, initialization, and error page entries The RFD's `active` / `inactive` values are renamed to `open` / `saved`, since v2 already uses "active" for a session attached to a connection.
benbrandt
enabled auto-merge (squash)
October 30, 2026 18:31
# Conflicts: # agent-client-protocol-schema/Cargo.toml # agent-client-protocol-schema/src/v1/agent.rs # agent-client-protocol-schema/src/v2/agent.rs # docs/protocol/v1/draft/error.mdx # docs/protocol/v1/draft/initialization.mdx # docs/protocol/v1/draft/schema.mdx # docs/protocol/v2/draft/error.mdx # docs/protocol/v2/draft/initialization.mdx # docs/protocol/v2/draft/overview.mdx # docs/protocol/v2/draft/schema.mdx # schema-generator/src/main.rs # schema/v1/meta.unstable.json # schema/v1/schema.unstable.json # schema/v2/meta.unstable.json # schema/v2/schema.unstable.json
# Conflicts: # agent-client-protocol-schema/src/v2/agent.rs
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds schema support for the session-status RFD behind a new
unstable_session_statusfeature (included inunstable), in both v1 and v2.Shape
status: required and strict, because Clients decide whether to resume based on it. It uses the same open-enum pattern asSystemPromptMode, so custom_values round-trip.state: reusesStateUpdate. A missing,nullor malformed value means "not reported", neveridle, as the RFD specifies.sessionCapabilities.status(v1) /session.status(v2), as aSessionStatusCapabilitiesobject.Status values renamed from the RFD
The RFD proposed
active/inactive. v2 already calls a session "active" on a connection fromsession/new,session/resumeorsession/forkuntil close or disconnect. A status ofactivethat means "in memory for any connection" invites Clients to skipsession/resume.open/savedfollow the session lifecycle instead:session/closefrees anopensession, after which it reads assaved, andsession/resumeopens it again. The RFD is updated, with an FAQ entry and a revision history entry.Docs
initializationpages (v1 and v2): astatusfield.errorpages (v1 and v2): an unknown session gets-32002, and a session that exists but isn't loaded is not an error.schema.mdxpages.#2734 (
session/set_title) touches the same spots in the docs andSessionCapabilities, so whichever merges second will need a small conflict resolved.