TL;DR
When you put a coding agent in "auto mode," a secondary LLM acts as a bouncer—approving safe commands and blocking unauthorized ones so you don't have to click "yes" fifty times. This paper shows that these automated permission checkers currently approve 54% to 93% of unauthorized actions, not because the models aren't smart enough, but because human requests leave the boundaries of what is allowed completely unspoken. Give the system explicit rules about what it can touch, and both the bouncer and the agent suddenly behave remarkably well.
What Problem Does This Paper Address?
Autonomous coding agents are great until they accidentally rm -rf a colleague's experiment directory. Manually confirming every shell command ruins the flow of automation, so modern tools (like Claude Code, Codex, and Qwen Code) offer an "auto mode." Here, a separate LLM-based permission checker sits between the agent and your terminal, deciding whether a proposed tool call matches your intent.
The catch? Humans speak in shorthand. If you ask an agent to "delete the stale artifacts for ticket range 48xx," you implicitly mean your artifacts in the dev environment—not your coworker Sam's files. Because natural language requests rarely spell out exact authorization boundaries, permission checkers frequently wave risky, out-of-scope actions right through, or frustratingly block harmless ones. The authors set out to disentangle why these checkers fail: is it weak models, missing environment context, or simply unstated rules?
Methods
To isolate what actually drives approval errors, the authors tested three deployed coding agents—Claude Code, Codex, and Qwen Code—in fresh container environments using a three-step experimental design:
- Live Recording: They ran the agents on hundreds of tasks, placing a logging layer between each agent and its permission checker to record every proposed action and approval verdict. Using executable reference answers, each action was objectively labeled as authorized or out of scope, measuring the Miss Rate (MR) (unauthorized actions let through) and False-Block Rate (FBR) (valid actions denied).
- Controlled Replay on Fixed Actions: Instead of re-running tasks from scratch (where agents might pick different actions), they replayed the exact same recorded actions to test three isolated interventions:
- Model Capability: Swapping the checker LLM for a stronger model from the same vendor.
- Target Information: Using a standardized checking pipeline across nine models, progressively feeding in earlier tool outputs and reconstructed object attributes (like owner and status).
- Explicit Authorization Scope: Appending concise scope statements (specifying permitted environment lanes, owners, and software components) directly to the user request.
- Complete Task Reruns: Finally, they reran all DevOps tasks end-to-end with the explicit scope statements included to see how the agents themselves adapted.
Datasets
Rather than introducing a new dataset, the authors evaluated 372 cases (1,116 total initial runs across the three products) drawn from two existing benchmarks:
- AmPermBench: 128 DevOps tasks (job cancellation, service restarts, artifact cleanup, branch cleanup) designed with natural scope ambiguity alongside verifiable sets of permitted targets.
- AgentDojo: 244 prompt-injection cases (banking and Slack tasks) used to test whether permission checkers falsely block legitimate work when adversarial text is present.
Key Insights and Ideas
- Smarter models and extra context can't read your mind: Upgrading to heavier-duty checker models didn't fix miss rates (one stronger model only lowered misses because it refused every second-stage prompt, triggering blanket blocks). Similarly, feeding the checker extra tool outputs didn't help on original requests—knowing an S3 bucket belongs to
samonly triggers a block if the checker knowssam's files are off-limits. - Context unlocks explicit rules: Once authorization rules are explicitly stated, environment context suddenly becomes crucial. If a command says
cancel-job 942, a checker that only reads command arguments still fails because942doesn't reveal who owns the job; giving the checker access to earlier query outputs solves this. - "Low risk" can dangerously override "unauthorized": Even when Codex's checker explicitly rated an action as having low authorization, it still approved over half of the medium-risk ones because it judged them to be small-scale or reversible. Authorization checkers need strict instructions not to play fast and loose just because an unauthorized change looks minor.
Key Results
- Baseline checkers struggle: Under original user requests on AmPermBench, product checkers missed (approved) 54% (Claude Code), 80% (Qwen Code), and 93% (Codex) of out-of-scope actions—statistically no better at separating bad actions from good ones than chance ($p \ge 0.32$).
- Unstated rules are the primary culprit: 132 of the 143 recorded out-of-scope actions violated rules missing from both the user prompt and tool outputs. Appending explicit scope statements slashed product checker miss rates from 67%–92% down to 8%–26%, while simultaneously dropping false-block rates from 10%–42% down to 2%–3%.
- Context + Scope approaches near-zero misses: Across ten standardized model settings, explicit rules dropped pooled miss rates from 58% to 9%. Adding tool outputs pushed misses down to 2%, and adding target attributes brought them to 1%.
- Agents stay in bounds when told where the bounds are: In 384 end-to-end task reruns with explicit scope statements, zero out-of-scope actions were proposed by any of the three agents, and final-state task accuracy jumped dramatically (e.g., from 25% to 94% for Claude Code, and 34% to 99% for Codex).
Limitations and Future Work
The out-of-scope findings rely on a single DevOps benchmark under benign user requests; the authors did not test adaptive attackers trying to trick the permission checker or prompt injections aimed directly at checker inputs. Furthermore, the scope statements were derived from benchmark reference answers and were complete by construction. In the real world, users won't naturally write airtight policy specs in every prompt—meaning future systems will need ways to maintain persistent organizational policies or proactively ask users clarifying questions when scope is ambiguous, without reintroducing confirmation fatigue.
Summary updated