From 61cef13b6eb5df94bcad57d8acc6cbe19d48d9a4 Mon Sep 17 00:00:00 2001 From: feiyun968-agent Date: Sat, 16 May 2026 09:27:58 +0000 Subject: [PATCH 1/2] docs(config): fix claude examples to use claude-agent-acp Both config.toml.example and docs/config-reference.md used `command = "claude"` with `args = ["--acp"]`, but the Claude Code CLI has no --acp flag. ACP support is provided by the separate @agentclientprotocol/claude-agent-acp npm package. Update both files to match docs/claude-code.md: - command = "claude-agent-acp" - args = [] - env = { CLAUDE_CODE_OAUTH_TOKEN } (OAuth-first, per project recommendation) Fixes #632 --- config.toml.example | 9 ++++++--- docs/config-reference.md | 6 +++--- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/config.toml.example b/config.toml.example index 20ccff34..759500f5 100644 --- a/config.toml.example +++ b/config.toml.example @@ -53,14 +53,17 @@ args = ["acp", "--trust-all-tools"] working_dir = "/home/agent" # [agent] -# command = "claude" -# args = ["--acp"] +# command = "claude-agent-acp" +# args = [] # working_dir = "/home/node" +# # Install the adapter first (requires Node >= 20): +# # npm install -g @agentclientprotocol/claude-agent-acp +# # Auth: run `claude auth login` once, or set CLAUDE_CODE_OAUTH_TOKEN. # ⚠️ SECURITY WARNING: Any env var listed here is accessible to the agent. # A user could trick the agent into leaking these values via prompt injection. # All supported backends support OAuth login — prefer that over env var API keys. # Note: env vars here can override baseline vars (HOME, PATH, USER) if needed. -# env = { ANTHROPIC_API_KEY = "${ANTHROPIC_API_KEY}" } +# env = { CLAUDE_CODE_OAUTH_TOKEN = "${CLAUDE_CODE_OAUTH_TOKEN}" } # # By default, the agent subprocess only inherits these baseline vars: # Linux/macOS: HOME, PATH, USER diff --git a/docs/config-reference.md b/docs/config-reference.md index 907c122c..0ba4f75b 100644 --- a/docs/config-reference.md +++ b/docs/config-reference.md @@ -105,10 +105,10 @@ working_dir = "/home/agent" # Claude Code [agent] -command = "claude" -args = ["--acp"] +command = "claude-agent-acp" +args = [] working_dir = "/home/node" -env = { ANTHROPIC_API_KEY = "${ANTHROPIC_API_KEY}" } +env = { CLAUDE_CODE_OAUTH_TOKEN = "${CLAUDE_CODE_OAUTH_TOKEN}" } # Codex [agent] From 7ee670ca942541f97ab4dba36ea9ef519316e218 Mon Sep 17 00:00:00 2001 From: shaun-agent Date: Sat, 16 May 2026 14:41:59 +0000 Subject: [PATCH 2/2] docs(config): use neutral env example --- docs/config-reference.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/config-reference.md b/docs/config-reference.md index 0ba4f75b..c8a31ff4 100644 --- a/docs/config-reference.md +++ b/docs/config-reference.md @@ -89,7 +89,7 @@ The AI agent subprocess that OpenAB spawns to handle messages via ACP. | `command` | string | *required* | Agent binary (e.g. `kiro-cli`, `claude`, `codex`, `gemini`, `copilot`, `opencode`, `cursor-agent`). | | `args` | string[] | `[]` | CLI arguments passed to the agent. | | `working_dir` | string | `"/tmp"` | Working directory for the agent process. | -| `env` | map | `{}` | Extra environment variables (e.g. `{ ANTHROPIC_API_KEY = "${ANTHROPIC_API_KEY}" }`). | +| `env` | map | `{}` | Extra environment variables (e.g. `{ OPENAI_API_KEY = "${OPENAI_API_KEY}" }`). | | `inherit_env` | string[] | `[]` | Env var names to inherit from the OAB process (e.g. vars injected via K8s `envFrom`). Keys in `env` take precedence. | > **Default inherited vars:** After `env_clear()`, the agent always receives `HOME`, `PATH`, and `USER` (on Windows: `USERPROFILE`, `USERNAME`, `PATH`, `SystemRoot`, `SystemDrive`). Use `inherit_env` to pass additional vars beyond this baseline.