Skip to content

[FEATURE]: ACP v2 draft spec support #44877

Open

Description

@mountaintopsolutions

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/prompt returns {} on acceptance; foreground state flows as state_update notifications (running/idle with stopReason)
  • Mid-turn steering — a second session/prompt admitted while a turn is running steers at the next safe boundary
  • Initialize restructure — capabilities/info fields, session-scoped capability groups, protocolVersion: 2 negotiation
  • Cancel confirmation — confirmation is state_update: idle with stopReason: cancelled, not the prompt response
  • Message IDs — messageId on all chunks; whole-message upserts (user_message) with acknowledgment
  • Tool calls — tool_call_update for create+patch (stop emitting tool_call create)
  • Agent-owned terminal display — terminal_update upserts with base64-encoded output.data and exitStatus
  • Structured diffs — changes array + git_patch format instead of oldText/newText
  • Permission requests — required title, optional description, extensible subject union
  • Plans — plan_update with planId keyed tagged union
  • Session lifecycle — session/resume with replayFrom
  • Session modes removed — express as config options with category: mode
  • Auth renames — authenticate → auth/login, logout → auth/logout
  • MCP config — type discriminator (http/sse/acp/stdio)
  • Slash commands — input: { type: "text", hint } discriminator
  • JSON-RPC batch — accept and process batch arrays on stdio
  • Extensibility — open enums, _meta passthrough, 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

Activity

  1. mountaintopsolutions commented on Sep 4, 2026

    @mountaintopsolutions
    Author

    Anyone interested? Steering support would be amazing right now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions