GeezerVison is showing github.com — opencode acp: implement the _session/steering extension · Issue #58766 · anomalyco/opencode
opencode acp: implement the _session/steering extension #58766DescriptionProblem
OpenCode's interactive mode accepts user input while a turn is running and merges it into the current loop. The ACP bridge (opencode acp) does not expose this path: it implements neither the _session/steering request nor its initialize advertisement. ACP clients (Zed, Codeg, Neovim) therefore queue user input until the current turn completes, even though the server-side session already has a queue with the right behavior.
The extension
A _meta convention currently used by two first-party adapters (claude-agent-acp, codex-acp).
Advertise at initialize (top-level _meta, not agentCapabilities._meta):
{ "_meta": { "steering": { "supported": true } } }
Request:
{ "method": "_session/steering", "params": {
"sessionId": "...",
"prompt": [ /* ContentBlock[], same types session/prompt accepts */ ],
"_meta": { "steering": { "idleBehavior": "promptRequired" } }
} }
Response — exactly one outcome:
| outcome |
meaning |
content |
injected |
appended to the running turn |
consumed |
promptRequired |
the turn completed before the steer was processed; the client sends a normal session/prompt instead |
not consumed |
startedNewTurn |
the agent started a new turn itself |
consumed, but no host request owns the new turn |
Required semantics
Two behaviors make this safe for clients. Both have corresponding bug histories in claude-agent-acp:
- When the request carries
idleBehavior: "promptRequired" and the turn completes before the steer is processed, the response must be promptRequired and the content must remain unconsumed. An adapter that starts its own turn here produces a turn no host request owns, and clients must fall back to end-of-turn queuing for that adapter — the current situation for codex-acp (fix: support a host-owned idle steering fallback agentclientprotocol/codex-acp#593).
- The
session/prompt response for the turn must remain pending until all output for that turn, including the steered content, has finished. claude-agent-acp 0.64.0 settled the prompt when the interrupted cycle's result arrived, and the continuation streamed with no active prompt (Injected steering can outlive its owning session/prompt agentclientprotocol/claude-agent-acp#934). 0.65.0 (/files visual bug #958) waits for the idle state covering both cycles. Settling early consumes the user's content and invalidates the client's turn bookkeeping.
Scope
The session loop already handles mid-turn user messages for interactive mode. The bridge needs to route _session/steering into that path (not into a new session/prompt) and return the outcome.
References
Filed from Codeg (https://github.com/spacering-net/codeg). We run both adapters above and can validate an implementation against client behavior on our side. Activityopencode-agent commented on Oct 24, 2026 Thanks for the detailed write-up, and for offering to validate against Codeg!
I think this is a duplicate of #53042, which asks for the same _session/steering extension in opencode acp: the _meta.steering.supported advertisement at initialize, and injected vs. promptRequired with nothing consumed when the session is idle.
Possible duplicates and related issues, ordered by likelihood:
Your second requirement, that the session/prompt response stays pending until the steered output has finished (claude-agent-acp#934/#958), would be useful feedback on #54394. Testing that PR against Codeg would help too.
The bot will close this issue as a duplicate in 1 day unless you reply explaining how your request differs.
leehom0123 commented on Oct 24, 2026 Duplicate of #53042, which predates this and carries the same proposal (same handler, same injected/promptRequired outcomes). Note there too that the companion PR #53043 was closed because V1 no longer takes PRs, so steering is expected to land via the V2 ACP path. leehom0123 commented on Oct 24, 2026 Closing as duplicate of #53042. opencode-agent commented on Oct 25, 2026 Closing this as a duplicate of #53042, since we haven't heard otherwise in the past day. That issue covers the same _session/steering extension for opencode acp, and #54394 is the open PR implementing it.
To follow progress, please subscribe to #53042 and #54394. Your point that the session/prompt response should stay pending until the steered output has finished (claude-agent-acp#934/#958) would be useful feedback on #54394, as would testing it against Codeg. If your request is different after all, reply here and we'll take another look. Thanks!
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|