Repository navigation
feat(agents): add codex-acp, gemini-acp, opencode-acp ACP adapters - #626
Merged
8nevil8 merged 3 commits intoOct 12, 2026
Merged
Conversation
Adds three new ACP (Agent Client Protocol) adapters so IDEs (Zed, JetBrains, AIR) can drive Codex, Gemini CLI, and OpenCode directly via stdio JSON-RPC, alongside the existing claude-acp/kimi-acp: - codex-acp: external adapter via @agentclientprotocol/codex-acp, configured through an injected CODEX_CONFIG env var (no --config flags, since the wrapper ignores stray argv). - gemini-acp: native mode on the same gemini binary, prepends --acp. - opencode-acp: native mode on the same opencode binary, prepends the acp subcommand. Also migrates claude-acp off the deprecated @zed-industries/claude-code-acp package to its renamed replacement, @agentclientprotocol/claude-agent-acp (cliCommand: claude-agent-acp). Wires all three into the registry, AgentCLI metadata map, package.json bin entries, bmad.plugin.ts tool mapping, the analytics report's agent color palette, and install.ps1's command list.
…ase agent's
codex.plugin.ts and opencode.plugin.ts hardcoded their base agent's
clientType ('codemie-codex' / 'codemie-opencode') in buildHookConfig() and
the incremental-sync buildContext()/buildUploadContext(), so sessions
launched by codex-acp/opencode-acp were mistagged as plain codex/opencode in
telemetry despite having their own distinct ssoConfig.clientType.
Both now read env.CODEMIE_CLIENT_TYPE (already set by BaseAgentAdapter from
metadata.ssoConfig.clientType for every agent) with a fallback to the old
hardcoded value, so plain Codex/OpenCode are unaffected and the ACP variants
are tagged correctly.
Also closes two gaps this surfaced for codex-acp/opencode-acp:
- request-sanitizer.plugin.ts's ALLOWED_AGENTS was missing
codemie-opencode-acp, even though opencode-acp shares the exact same AI SDK
request path (same opencode-ai binary) that the sanitizer exists to patch.
- syncProcessor.ts's resolveConversationFolder was missing codex-acp (added
previously) and now gemini-acp/opencode-acp, so their conversations synced
to the default folder instead of their agent-specific one.
header-injection.plugin.ts and codex-encrypted-content-sanitizer.plugin.ts
already correctly listed codemie-codex-acp from the prior commit.
Updates README's consolidated "ACP Agent usage in IDEs and Editors" section to cover all four ACP agents (claude-acp, codex-acp, gemini-acp, opencode-acp) across Zed, generic JetBrains, and JetBrains AIR, plus the external-agents table. Adds matching per-agent sections to docs/AGENTS.md (Codex ACP, Gemini CLI ACP, OpenCode ACP), updates the Claude Code ACP section for the new package name and the AIR config block, and extends docs/COMMANDS.md's agent command reference. Updates the root AGENTS.md Agent Plugins table to note each ACP variant and its upstream package.
8nevil8
approved these changes
Oct 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds three new ACP (Agent Client Protocol) adapters —
codex-acp,gemini-acp,opencode-acp— so IDEs (Zed, JetBrains, AIR) can drive Codex, Gemini CLI, and OpenCode directly via stdio JSON-RPC, matching the existingclaude-acp/kimi-acppattern. Also migratesclaude-acpoff the deprecated@zed-industries/claude-code-acppackage, and fixes a telemetry mistagging bug surfaced along the way.Changes
codex-acp(external adapter via@agentclientprotocol/codex-acp, configured through an injectedCODEX_CONFIGenv var),gemini-acp(native--acpmode, samegeminibinary),opencode-acp(nativeacpsubcommand, sameopencodebinary).claude-acpmigrated to@agentclientprotocol/claude-agent-acp(the deprecated@zed-industries/claude-code-acppackage no longer receives updates).codex.plugin.tsandopencode.plugin.tshardcoded their base agent'sclientTypein session-start/incremental-sync/session-end telemetry, mistaggingcodex-acp/opencode-acpsessions as plaincodex/opencode. Both now readenv.CODEMIE_CLIENT_TYPE(already set byBaseAgentAdapterfrom each plugin's ownssoConfig.clientType), with a fallback that leaves plain Codex/OpenCode behavior unchanged.request-sanitizer.plugin.tswas missingcodemie-opencode-acpin its allowlist, even thoughopencode-acpshares the exact AI SDK request path the sanitizer patches.syncProcessor.ts's conversation-folder routing was missingcodex-acp/gemini-acp/opencode-acp.package.json/bmad.plugin.ts/analytics-report wiring for the three new agents.docs/AGENTS.mdsections for Codex/Gemini/OpenCode ACP;docs/COMMANDS.mdand rootAGENTS.mdupdated.Testing
registry.test.tsupdated, regression tests for theclientTypefallback fix (Codex + OpenCode), new allowlist/folder-routing test cases.npm run typecheck,npm run lint(0 warnings),npm run buildall pass.Checklist
npm run typecheck && npm run lint && npm run build+ affected test suites pass)main(branched from currentmain)