Skip to content

feat(opencode): add Claude Code ACP runtime - #41901

Closed
stocky789 wants to merge 1 commit into
anomalyco:devfrom
stocky789:claude-acp-runtime
Closed

feat(opencode): add Claude Code ACP runtime#41901
stocky789 wants to merge 1 commit into
anomalyco:devfrom
stocky789:claude-acp-runtime

Conversation

@stocky789

@stocky789 stocky789 commented Aug 12, 2026

Copy link
Copy Markdown

Issue for this PR

Related to #5182, #20002, and #24038.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds Claude Code as an OpenCode runtime through @agentclientprotocol/claude-agent-acp.

Selecting Claude Code from /models starts an ACP session in the current workspace and maps Claude's streamed text, reasoning, tool calls, permissions, questions, usage, compaction, and configuration updates into OpenCode's existing session and TUI. Claude-specific slash commands and effort/fast state are shown only while this runtime is selected.

Claude Code continues to own authentication and model execution; OpenCode does not read or manage subscription credentials.

This is a draft for architecture review and refactoring before it is marked ready.

How did you verify your code works?

  • Installed and exercised the branch with an isolated HOME and fixture workspace.
  • Verified Claude model selection and the /effort and /fast command surfaces in the TUI.
  • bun typecheck passes in packages/opencode, packages/tui, and packages/app.
  • Focused tests: 141 pass / 5 fail in packages/opencode; 19 pass in packages/tui; 7 pass in packages/app.
  • Built the standalone Linux executable and verified all Claude ACP models are listed.

Known draft blockers: the five failing tests cover Windows-path handling when run on Linux, and an actual Claude prompt through the standalone executable currently exits with ACP connection closed. Both need to be resolved before this is ready for review.

Screenshots / recordings

Captured from the installed branch in an isolated fixture workspace.

Before — upstream dev has no Claude Code model result

Upstream dev model search with no Claude Code result

After — Claude Code models in /models

Claude Code models in the OpenCode model picker

Claude-specific slash commands

Claude-specific slash commands in OpenCode

Claude /effort levels

Claude effort command showing low medium high and max

Claude /fast toggle

Claude fast command showing on and off modes

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

The search results show only PR #41901 (the current PR) as the only exact match for Claude Code ACP runtime implementation. The other results like #29789 (Dynamic workflows) and #20491 (Kiro provider) are different features.

No duplicate PRs found

@stocky789

Copy link
Copy Markdown
Author

Superseded by a replacement draft using the existing stocky789:claude-acp branch. No implementation change.

@stocky789 stocky789 closed this Aug 12, 2026
@stocky789
stocky789 deleted the claude-acp-runtime branch August 12, 2026 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant