{"id":51228935,"url":"https://github.com/hecatehq/claude-code-acp-adapter","last_synced_at":"2026-06-28T14:01:52.867Z","repository":{"id":365614749,"uuid":"1272898852","full_name":"hecatehq/claude-code-acp-adapter","owner":"hecatehq","description":"ACP adapter for running Claude Code over stdio","archived":false,"fork":false,"pushed_at":"2026-06-18T06:24:33.000Z","size":73,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-18T06:24:55.339Z","etag":null,"topics":["acp","adapter","claude-code","coding-agent"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hecatehq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":"docs/ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-18T03:13:53.000Z","updated_at":"2026-06-18T06:24:37.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/hecatehq/claude-code-acp-adapter","commit_stats":null,"previous_names":["hecatehq/claude-code-acp-adapter"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/hecatehq/claude-code-acp-adapter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecatehq%2Fclaude-code-acp-adapter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecatehq%2Fclaude-code-acp-adapter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecatehq%2Fclaude-code-acp-adapter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecatehq%2Fclaude-code-acp-adapter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hecatehq","download_url":"https://codeload.github.com/hecatehq/claude-code-acp-adapter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hecatehq%2Fclaude-code-acp-adapter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34890795,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-28T02:00:05.809Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acp","adapter","claude-code","coding-agent"],"created_at":"2026-06-28T14:01:49.812Z","updated_at":"2026-06-28T14:01:52.854Z","avatar_url":"https://github.com/hecatehq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# claude-code-acp-adapter\n\nNeutral Go ACP adapter for Claude Code.\n\nThis repository provides a Go ACP adapter for Claude Code. It runs as a small,\nauditable binary that speaks ACP over stdio. The adapter can run Claude Code\nprompts through its native command bridge. Hecate integration is covered by\nrelease-binary smoke tests; deeper Claude-native parity remains tracked as\nfuture work.\n\n## Goals\n\n- Speak standard Agent Client Protocol over stdio.\n- Keep the adapter independent from Hecate internals.\n- Avoid package-manager launchers, shell wrappers, and broad environment\n  inheritance.\n- Preserve the important behavior exposed by the previous Claude Agent ACP\n  adapter: sessions, settings, auth, model/config options, permission requests,\n  MCP servers, elicitation, tool updates, terminal output, cancellation, and\n  resume/load behavior.\n- Ship deterministic, checksum-verified, provenance-attested Go release\n  binaries.\n\n## Current Status\n\nImplemented:\n\n- stdlib-only JSON-RPC/NDJSON ACP transport scaffold\n- `initialize` response with adapter metadata\n- structured errors for unimplemented methods\n- source-review notes for the previous adapter behavior\n- unit tests for the protocol scaffold\n- `doctor` command for probing the local Claude Code binary boundary\n- process-backed runtime launcher seam\n- subprocess JSON-RPC client for ACP-style stdio runtime bridges\n- ACP initialize client for subprocess runtime negotiation\n- typed ACP session lifecycle calls for subprocess runtimes\n- ACP server-to-runtime bridge for session methods and streamed updates\n- runtime host seam that launches, initializes, and exposes the bridged child\n- protocol forwarding for session load, resume, fork, list, delete, and\n  MCP-over-ACP message payloads\n- command-backed native Claude Code path using `claude --print`\n- ACP model, effort, and permission-mode config options for the command-backed\n  path\n- command-backed Claude UUID session ids created with `claude --session-id` and\n  continued with `claude --resume`, including `session/load` / `session/resume`\n  adoption of host-known ids after adapter process restart\n- in-memory command-backed session fork plus bounded transcript replay for\n  multi-turn continuity while the adapter process is alive\n- command-backed `session/list` metadata, `config_option_update`\n  notifications for config changes, and `session_info_update` notifications\n  when transcript metadata changes\n- command-backed `/init`, `/review`, `/code-review`, `/security-review`,\n  `/compact`, `/debug`, `/run`, and `/verify` advertisement through the normal\n  `claude --print` prompt path\n- command-backed ACP stdio/HTTP MCP server config propagation into Claude\n  `--mcp-config` with `--strict-mcp-config`\n- Claude `--output-format stream-json` translation into ACP assistant text,\n  thinking, tool-call, usage, and terminal stop-reason updates, plus generic\n  command `tool_call` activity for the native Claude process\n- ACP `authenticate` mapped to the native `claude /login` command\n- ACP `logout` mapped to the native `claude auth logout` command\n- CI and tag-driven release packaging for checksum-verified,\n  provenance-attested binaries\n\nNot implemented yet:\n\n- deeper Claude Code / Claude Agent SDK integration beyond `claude --print`\n- deeper vendor-specific durable/native persistent session semantics beyond\n  Claude `--session-id` creation and `--resume` continuation\n- deeper provider-native permission/MCP lifecycle and elicitation edge cases\n  beyond parsed request mapping and the selected Claude Code permission mode\n- deeper Claude-native slash-command semantics beyond the adapter-owned command\n  set\n- runtime config/auth/model discovery and orphan-result handling\n- draft ACP RFD surfaces documented as future work in `docs/STABLE_READINESS.md`\n\n## Development\n\nShared ACP transport, runtime JSON-RPC, bridge, host, process, doctor runner,\nand fake-runtime test code lives in\n[acp-adapter-kit](https://github.com/hecatehq/acp-adapter-kit). Keep this repo\nfocused on the Claude Code-specific CLI boundary, doctor defaults, docs, release\nworkflow, and vendor behavior.\n\nThe binary remains the primary integration mode. Hosts that need an embedded\nadapter can import\n`github.com/hecatehq/claude-code-acp-adapter/claudecodeadapter` to build the\nsame ACP server, info/options, CLI spec, config options, environment allowlists,\nand Claude Code prompt command without shelling out to\n`claude-code-acp-adapter`. The embedded path still launches the underlying\n`claude` CLI for prompts; it only removes the extra adapter process boundary.\n\n```sh\nmake release-check\nmake snapshot\ngo test ./...\ngo test -race ./...\ngo vet ./...\ngo run ./cmd/claude-code-acp-adapter --version\ngo run ./cmd/claude-code-acp-adapter doctor\n```\n\nSee [docs/TESTING.md](docs/TESTING.md) for what is covered today and what still\nneeds production-grade/deeper Claude-native parity coverage.\nSee [docs/RELEASE.md](docs/RELEASE.md) for the tag-driven release flow.\nSee [docs/STABLE_READINESS.md](docs/STABLE_READINESS.md) for the gate before a\nstable adapter tag.\n\n## CLI Contract\n\nThe binary uses Cobra for human commands, but the root command with no arguments\nis reserved for ACP stdio. Do not add default logging, banners, usage output, or\nprompts to the no-argument path; stdout is the protocol stream.\n\nUse `doctor` before wiring this adapter into an ACP host. It resolves the Claude\nCode binary, runs a fixed-argv version probe through the hardened process\nrunner, and reports selected environment variable presence without printing\nsecret values. Use `--binary` to point at a non-default Claude executable and\n`--json` for machine-readable output.\n\nBy default, the root ACP server owns lightweight ACP sessions and runs each\nprompt through `claude --print` in the session workspace. The command-backed\npath exposes ACP config options for model, effort, and Claude Code permission\nmode, including Claude Code's `bypassPermissions` full-access mode, passes only\nprovider-specific environment variables through the shared process runner, and\nruns Claude with `--output-format stream-json`. Known\nClaude JSONL events are translated into ACP assistant text, thinking,\ntool-call, permission-request, and usage updates. Tool updates preserve Claude\nCode categories such as shell execution, file reads/edits, web fetch/search,\ntask tools, memory recall, todos, and plan/thinking tools; unknown JSONL events\nare ignored rather than shown as raw chat text. A generic `tool_call` still\nwraps the native Claude process execution so hosts can show the outer command\nboundary. The session state is lightweight in the adapter, but session ids are\nClaude-native UUIDs. New sessions are created with `claude --session-id`; later\nprompts and host-known sessions adopted through `session/load` or\n`session/resume` continue with `claude --resume`. `session/fork` and transcript\nreplay remain in-memory conveniences while the adapter process is alive.\n`session/list` returns the adapter's currently loaded session metadata, and\nlater prompts receive a bounded transcript prelude so command-backed turns keep\nconversational context while still using Claude's native session id.\n`session/close` cancels active work and frees the adapter's in-memory session\nstate; `session/delete` is the destructive cleanup path hosts should use when\ndeleting the owning chat/session. Config changes return the current config\noption list and publish `config_option_update` notifications. Completed\ncommand-backed prompts publish `session_info_update` notifications with the\nin-memory title and updated timestamp when transcript metadata changes.\nThe adapter advertises `/init`, `/review`, `/code-review`, `/security-review`,\n`/compact`, `/debug`, `/run`, and `/verify` as ACP available commands and passes\nthem through the normal `claude --print` prompt path. Other Claude Code commands\nremain unadvertised until their non-interactive behavior is explicitly tested.\nThe adapter advertises one ACP auth method (`agent-login`): ACP\n`authenticate` maps to `claude /login`, and ACP `logout` maps to\n`claude auth logout`.\n\nThe root ACP server can also launch an explicit subprocess-backed ACP runtime\nwith `--runtime-binary`, `--runtime-workdir`, and repeated `--runtime-arg`\nflags. That runtime process receives only the Claude Code adapter's explicit\nenvironment allowlist (`PATH`, `HOME`, `XDG_CONFIG_HOME`, `TMPDIR`,\n`ANTHROPIC_API_KEY`, `ANTHROPIC_BASE_URL`, and `CLAUDE_CONFIG_DIR`); the parent\nenvironment is not inherited wholesale. Runtime flags override the native\ncommand-backed path and are mostly useful for protocol parity testing.\n\n## Source Review\n\nBefore implementing the real bridge, read [docs/SOURCE_REVIEW.md](docs/SOURCE_REVIEW.md).\nIt records historical package/source behavior that this project needs to\npreserve or deliberately replace.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhecatehq%2Fclaude-code-acp-adapter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhecatehq%2Fclaude-code-acp-adapter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhecatehq%2Fclaude-code-acp-adapter/lists"}