anomalyco / anomalyco/opencode
[FEATURE]: ACP v2 draft spec support
Open
@jlongster is already working on this.
Since Aug 25, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
The Agent Client Protocol v2 draft has been published with a migration guide for agents. This is ACP v2 draft (the protocol layer), not to be confused with OpenCode V2 (the session core).
Key changes in ACP v2 draft that we should support:
- Prompt lifecycle —
session/promptreturns{}on acceptance; foreground state flows asstate_updatenotifications (running/idlewithstopReason) - Mid-turn steering — a second
session/promptadmitted while a turn is running steers at the next safe boundary - Initialize restructure —
capabilities/infofields, session-scoped capability groups,protocolVersion: 2negotiation - Cancel confirmation — confirmation is
state_update: idlewithstopReason: cancelled, not the prompt response - Message IDs —
messageIdon all chunks; whole-message upserts (user_message) with acknowledgment - Tool calls —
tool_call_updatefor create+patch (stop emittingtool_callcreate) - Agent-owned terminal display —
terminal_updateupserts with base64-encodedoutput.dataandexitStatus - Structured diffs —
changesarray +git_patchformat instead ofoldText/newText - Permission requests — required
title, optionaldescription, extensiblesubjectunion - Plans —
plan_updatewithplanIdkeyed tagged union - Session lifecycle —
session/resumewithreplayFrom - Session modes removed — express as config options with
category: mode - Auth renames —
authenticate→auth/login,logout→auth/logout - MCP config —
typediscriminator (http/sse/acp/stdio) - Slash commands —
input: { type: "text", hint }discriminator - JSON-RPC batch — accept and process batch arrays on stdio
- Extensibility — open enums,
_metapassthrough, unknown content block types
This should be gated behind OPENCODE_EXPERIMENTAL_ACP_V2 with v1/v2 side-by-side support so existing clients are unaffected. The SDK needs upgrading from 0.21.0 to 1.3.0.
Implementation: #44524
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.