RFD: session/status — session liveness check#986
Open
chazcb wants to merge 3 commits intoagentclientprotocol:mainfrom
Open
RFD: session/status — session liveness check#986chazcb wants to merge 3 commits intoagentclientprotocol:mainfrom
chazcb wants to merge 3 commits intoagentclientprotocol:mainfrom
Conversation
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.
Summary
Proposes adding a
session/statusmethod — a side-effect-free, read-only probe that checks whether an agent is currently handling a specific session.Problem
ACP has no way to ask an agent "are you currently handling this session?" without side effects. Every existing session method mutates state:
session/loadforces the agent to start handling the sessionsession/promptsends work to the sessionsession/attachattaches a client and sets up rolessession/resumeresumes and starts handling the sessionIf a client or routing layer wants to know "is this session live — will other session methods work?" before committing, there is no option.
Proposal
{ "method": "session/status", "params": { "sessionId": "sess_abc123" } } → { "result": { "status": "live" } } // agent is handling this session → { "result": { "status": "not_found" } } // agent is not handling this sessionIf
"live", the client can trust thatsession/prompt,session/cancel, and other session methods will work. If"not_found", the client should usesession/loadto start the session.Contract: must be side-effect-free, cheap, and safe to call frequently.
Use cases
session/prompt(already live) andsession/load(needs to be started)