Skip to content

Port ACP support to V2 core and APIs #35457

Closed

Description

@opencode-agent

Priority

Low — the V2 protocol/server/client APIs are still being completed, so this should wait until the required surfaces settle.

Current state

ACP exists on the \�0v2\�0 branch, but it has not been ported to the V2 core/API stack end-to-end.

At \�0f9d1d3b259cf6c1f2195068214941fc7a19cfd11\�0:

  • \�0packages/opencode/src/acp/service.ts\�0 still uses \�0@opencode-ai/sdk/v2\�0 and calls the compatibility \�0sdk.session.*\�0 APIs.
  • Those routes are still backed by the legacy app services such as \�0SessionPrompt\�0, \�0Session\�0, and the legacy event/permission bridge.
  • The V2 protocol/client and core surfaces needed by ACP have been landing incrementally, so copying the existing adapter onto the branch is not the same as running ACP on V2 execution semantics.

Goal

Port \�0opencode acp\�0 to V2 sessions, execution, events, and public APIs without routing through the legacy session stack.

Scope

  • Define the ACP-to-V2 boundary: use the generated V2 client/protocol where appropriate, or direct V2 services when the ACP subprocess owns the runtime.
  • Port session lifecycle: new, load/resume, list, close, fork, and cancel.
  • Port prompt admission/execution to durable V2 session semantics.
  • Map V2 message/tool/permission/session events to ordered ACP \�0session/update\�0 notifications.
  • Preserve model, agent/mode, variant/effort, usage, and session config-option behavior.
  • Port per-session MCP setup once the V2 MCP API is ready.
  • Keep slash-command behavior aligned with the V2 command API rather than the legacy command path.
  • Remove ACP's dependency on legacy \�0@opencode-ai/sdk/v2\�0 compatibility routes when the port is complete.

Acceptance criteria

  • \�0opencode acp\�0 creates and drives V2 sessions end-to-end.
  • Prompt, streaming text/thoughts, tool updates, permissions, cancel, reload/resume, and fork have ACP integration coverage against V2.
  • ACP turn completion is ordered after all turn updates.
  • Existing ACP subprocess tests run against the V2 implementation.
  • No legacy session execution path is required by ACP.

Dependencies

Track this after the remaining V2 API work needed for session lifecycle, command execution, MCP, permissions/events, and generated clients is stable.

Source: https://discord.com/channels/1391832426048651334/1447692703549755466/1523384646195216384

Activity

  1. AbbasCiatek commented on Jul 15, 2026

    @AbbasCiatek

    can we increase the priority of this I like to use acp in my editors

  2. Deroswent commented on Sep 29, 2026

    @Deroswent

    This issue significantly affects the user experience in IDEs like Zed and many others.
    Please raise its priority.

  3. nexxeln commented on Oct 6, 2026

    @nexxeln
    Contributor

    Done. #37907 ported opencode acp to V2 sessions, events, and the generated client, and later ACP PRs such as #52503, #53359, and #53360 filled in cancellation, session lifecycle, and tool content. Per-session MCP isolation stays tracked in #40978.

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions