Skip to content

Commit 4176666

Browse files
fix(acp): resolve bypass mode for claude-agent-acp
The _BYPASS_MODE_MAP only matched "claude-code" but the actual agent name is "@zed-industries/claude-agent-acp", which doesn't contain that substring. Add "claude-agent" as an additional key so the mode correctly resolves to "bypassPermissions" instead of falling through to the default "full-access" (which claude-agent-acp rejects). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7633846 commit 4176666

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

openhands-sdk/openhands/sdk/agent/acp_agent.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ def _make_dummy_llm() -> LLM:
108108
# Known ACP server name → bypass-permissions mode ID mappings.
109109
_BYPASS_MODE_MAP: dict[str, str] = {
110110
"claude-code": "bypassPermissions",
111+
"claude-agent": "bypassPermissions",
111112
"codex-acp": "full-access",
112113
}
113114
_DEFAULT_BYPASS_MODE = "full-access"
@@ -141,8 +142,8 @@ def _resolve_bypass_mode(agent_name: str) -> str:
141142
"""Return the session mode ID that bypasses all permission prompts.
142143
143144
Different ACP servers use different mode IDs for the same concept:
144-
- claude-code-acp → ``bypassPermissions``
145-
- codex-acp → ``full-access``
145+
- claude-code-acp / claude-agent-acp → ``bypassPermissions``
146+
- codex-acp → ``full-access``
146147
147148
Falls back to ``full-access`` for unknown servers.
148149
"""

0 commit comments

Comments
 (0)