HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
Python agent-apiagent-frameworkagent-harnessai-agentsai-infrastructurecoding-agentconformance-testingdeepseek-harnessharness-engineeringhermesllmopen-protocolopen-sourceopen-standardpi-coding-agentself-hosteduhpunified-apiunified-harness-protocolunified-interface
fix(runner): qwen headless runs have NO shell/write/edit without --yolo
richard-epsillaf0848354e4e6
diff --git a/gateway/app.py b/gateway/app.pyindex 955bdc56..0fc54d71 100644--- a/gateway/app.py+++ b/gateway/app.py@@ -11278,9 +11278,11 @@ _BASE_CATALOG: dict[str, dict] = {"system_prompt": ("You are Qwen Code, an autonomous coding agent. You work on a real git ""workspace with shell and file access, reading and editing files and ""running commands to complete the task end to end."),- # From the live init event's tool list (0.22.1). No per-tool kill switch on the CLI, so- # disabling is an instruction to the model — same tier as codex/hermes/dsh.- "tools": [("read_file", "File Read"), ("write_file", "File Write"), ("edit", "Edit"),+ # From the live init event's tool list under --yolo (0.22.1) — shell/write/edit exist+ # ONLY in yolo mode, which the runner always passes. No per-tool kill switch on the CLI,+ # so disabling is an instruction to the model — same tier as codex/hermes/dsh.+ "tools": [("run_shell_command", "Shell"), ("read_file", "File Read"),+ ("write_file", "File Write"), ("edit", "Edit"),("grep_search", "Search"), ("glob", "Glob"), ("web_fetch", "Web Fetch"),("todo_write", "Todo"), ("skill", "Skill"), ("agent", "Subagent")],"tool_enforcement": "instruction",diff --git a/runner/server.py b/runner/server.pyindex 6e0d3cc2..d6970fa8 100644--- a/runner/server.py+++ b/runner/server.py@@ -2417,7 +2417,15 @@ def _build_qwen(provider: str, auth: Auth, model: str, prompt: str, cwd: str, en# Resume REQUIRES an explicit auth type in non-interactive mode (verified on 0.22.1:# without it every -r run dies "No auth type is selected"); fresh runs take it too for# one deterministic path.- "--auth-type", "openai"]+ "--auth-type", "openai",+ # WITHOUT --yolo a headless run registers NO shell, write or edit tool at all — the+ # default "auto" permission mode simply omits them, and the agent announces "I don't+ # have a shell tool registered" and tries to delegate. Verified both ways on 0.22.1:+ # default init tools lack shell/write/edit; with --yolo they are present, perm mode+ # "yolo", and a real command wrote a file. The sandbox is the trust boundary here, the+ # same rationale as claude --dangerously-skip-permissions, pi --approve and opencode+ # --auto.+ "--yolo"]if resume_session_id:cmd += ["-r", resume_session_id]return cmddiff --git a/runner/tests/test_qwen_build.py b/runner/tests/test_qwen_build.pyindex c5c493fb..8fd23a1e 100644--- a/runner/tests/test_qwen_build.py+++ b/runner/tests/test_qwen_build.py@@ -25,6 +25,15 @@ def test_argv_is_headless_stream_json_with_explicit_auth_type():assert "--auth-type" in cmd and "openai" in cmd+def test_yolo_is_present_or_the_agent_has_no_shell_at_all():+ """Verified on 0.22.1 both ways: without --yolo a headless run registers NO shell, write or+ edit tool (the agent literally says "I don't have a shell tool registered" and delegates);+ with it, perm mode is yolo and a real command wrote a file. Losing this flag is a silent+ capability amputation, not a permission tweak."""+ cmd, _, _ = _argv()+ assert "--yolo" in cmd++def test_resume_uses_dash_r():cmd, _, _ = _argv(resume_session_id="8e039a38-f91f")assert cmd[-2:] == ["-r", "8e039a38-f91f"]