From b0d025ecd20387a4f8761813b605028f5bf8e8cd Mon Sep 17 00:00:00 2001 From: Drew Stone Date: Tue, 7 Jul 2026 18:00:48 -0600 Subject: [PATCH] fix(bench): keep opencode TB permissions in parity --- bench/tb_agents/opencode_router_agent.py | 5 +++++ bench/tb_agents/opencode_supervisor_agent.py | 15 +-------------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/bench/tb_agents/opencode_router_agent.py b/bench/tb_agents/opencode_router_agent.py index e9991f0..6d504fb 100644 --- a/bench/tb_agents/opencode_router_agent.py +++ b/bench/tb_agents/opencode_router_agent.py @@ -157,10 +157,15 @@ def _build_router_config(self) -> str: """ config = { "$schema": "https://opencode.ai/config.json", + # Headless benchmark runs cannot answer interactive permission prompts. + # Keep this identical for raw and supervisor arms. "permission": { "edit": "allow", "bash": "allow", "webfetch": "allow", + "read": "allow", + "write": "allow", + "external_directory": "allow", }, "provider": { self._provider: { diff --git a/bench/tb_agents/opencode_supervisor_agent.py b/bench/tb_agents/opencode_supervisor_agent.py index 7d9b42b..ee2c6ad 100644 --- a/bench/tb_agents/opencode_supervisor_agent.py +++ b/bench/tb_agents/opencode_supervisor_agent.py @@ -58,21 +58,8 @@ def _mcp_url(self) -> str: return f"http://{DOCKER_BRIDGE_GATEWAY}:{self._mcp_port}/mcp" def _build_router_config(self) -> str: + """Base router config plus the coordination MCP block.""" config = json.loads(super()._build_router_config()) - perm = config.setdefault("permission", {}) - perm.update( - { - "edit": "allow", - "bash": "allow", - "webfetch": "allow", - "read": "allow", - "write": "allow", - "task": "allow", - "plan_enter": "allow", - "plan_exit": "allow", - "question": "allow", - } - ) if self._mcp_port is not None: config["mcp"] = { "coordination": {