#4226·career-ops

batch-runner --cli: 默认情况下,Qwen 和 Gemini 工作程序被拒绝写入/执行 shell,添加 agy/codex/Copilot/grok 需要权限决定

作者: FrameAutomata创建于 2026年9月15日更新于 2026年9月15日

Code of Conduct

Existing issues

  • I searched existing issues and this hasn't been reported yet

What happened?

Follow-up to #738. On main (6255cc2), batch/batch-runner.sh --cli Qwen and --cli Gemini launch workers that, on a default CLI config, are not allowed to do what a batch worker has to do. Found while scoping the optional follow-up from the #738 review (align --cli with the headless table in AGENTS.md), which runs into the same question for every CLI it would add. Not reproduced end to end. I don't have Qwen, Gemini, agy, codex, Copilot or grok installed. Everything below is read from each CLI's source or official docs, linked and pinned. A batch worker has to write files and run a shell command (batch/batch-prompt.md):

  • Step 3 (:375-380) writes reports/{{REPORT_NUM}}-….md
  • Step 4 (:485) runs node generate-pdf.mjs
  • Step 5 (:509-514) writes batch/tracker-additions/{{ID}}.tsv --cli Claude can, because the runner passes --dangerously-skip-permissions. The non-Claude branches (batch-runner.sh:986-1003) pass only the prompt and an optional --model:
--cli Invocation Write + shell, headless, default config Source
opencode opencode run allowed permissions docs: most permissions default to allow
Qwen Qwen -p denied config.ts:1921-1939: when !interactive, DEFAULT approval mode denies shell, edit and write_file unless explicitly allowed
Gemini Gemini -p denied write.toml:51-61: the ask_user rules for run_shell_command / write_file are interactive = true; with no match, policy-engine.ts:299-301 defaults to DENY when non-interactive
opencode works only because it allows everything by default, which is the same exposure as Claude's --dangerously-skip-permissions.
The runner fails closed, so nothing is lost silently. A worker that exits 0

内容来源: santifer/career-ops