Skip to content

Explicit authorization scope improves LLM-based permission checks in coding agentsExplicit authorization scope improves LLM-based permission checking in coding agents

Shimeng Yang, Changjian Zhou, Chuan Qin, Junfeng Fang, Anchen Ni, Bin Yan, Senchang Hu
University of Toronto; The University of Melbourne; National University of Singapore; Tsinghua University
arXiv: Jailbreaks, Prompt Injection, Poisoning & DefensesarXiv:2611.39420Originally published Indexed by this site · 2 days agoSelected DefensesSelectedAttention39

Quick read

Defenses

Based on the paper PDF (AI-generated); refer to the original

The authors evaluated the permission checkers of three coding agents: under original requests, the miss rate for unauthorized actions was 54%–93%, which decreased after completing the authorization scope.

Threat modelStudies approval errors of the permission checker in auto mode: the agent proposes tool calls based on user requests, and the checker should allow authorized actions and block out-of-scope actions. All out-of-scope actions come from benign requests; the paper does not study attackers who adapt to checker feedback or injected text in checker inputs.

Questions
Coding agents' auto mode delegates approval to a permission checker, but natural-language requests often do not fully state the authorization scope. The authors focus on whether the checker lets unauthorized actions through, falsely blocks authorized actions, and whether the errors come from model capability, goal information, or missing rules.
Methods
The authors record the actions and approvals of Claude Code, Codex, and Qwen Code, and label unauthorized actions with executable reference answers; then, holding actions fixed, they respectively change the checker model, add tool outputs and goal attributes, append a scope statement, and rerun the full tasks.
Experiments and results
Under the original requests, the three checkers' unauthorized-action miss rates were 54%–93%. Of 143 unauthorized actions, 132 depend on rules not stated in the input; after adding rules, these product checkers' MR on the same actions drops to 8%–26%, and 384 full reruns produced no actions labeled as unauthorized.
Limitations and future work
The evidence for unauthorized actions comes from a DevOps benchmark that preserves scope ambiguity, and all of it stems from benign requests; adaptive attacks or injected text in checker inputs were not studied. Rules are generated from reference answers and are complete by construction; partial or incorrect rules were not tested; except for two Codex comparisons, each configuration was run only once.
Experimental setupClaude Sonnet 5.5、GPT-5.5 et al. · AmPermBench、AgentDojo · miss rate (MR)、false-block rate (FBR) et al.
Metrics
miss rate (MR)false-block rate (FBR)final-state correctness
AI summaryand selection rationaleResearchers from the University of Toronto, the University of Melbourne, the National University of Singapore and Tsinghua University tested the auto mode permission checkers of three coding agents—Claude Code, Codex and Qwen Code—on the AmPermBench and AgentDojo benchmarks, and found that under the original user requests the three wrongly allowed 54%–93% of unauthorized operations, and switching to a stronger model or adding context did not stably reduce the miss rate. Of 143 unauthorized operations, 132 violated authorization rules that were not stated in either the user request or the tool output. After explicitly writing the authorization scope—such as allowed objects, owners and components—into the request, the miss rate for these 132 operations dropped from 67%–92% to 8%–26%, and the false-block rate also decreased; after additionally supplying tool output and target attributes, it further dropped to 2% and 1%. The authors note that reliable automatic approval requires clearly defined permissions, accurate identification of the operation target, and consistent enforcement of authorization rules in the final decision.

Researchers from the University of Toronto, the University of Melbourne, the National University of Singapore and Tsinghua University tested the auto mode permission checkers of three coding agents—Claude Code, Codex and Qwen Code—on the AmPermBench and AgentDojo benchmarks, and found that under the original user requests the three wrongly allowed 54%–93% of unauthorized operations, and switching to a stronger model or adding context did not stably reduce the miss rate. Of 143 unauthorized operations, 132 violated authorization rules that were not stated in either the user request or the tool output. After explicitly writing the authorization scope—such as allowed objects, owners and components—into the request, the miss rate for these 132 operations dropped from 67%–92% to 8%–26%, and the false-block rate also decreased; after additionally supplying tool output and target attributes, it further dropped to 2% and 1%. The authors note that reliable automatic approval requires clearly defined permissions, accurate identification of the operation target, and consistent enforcement of authorization rules in the final decision.

Why it was selectedThe study attributes permission-check failures to missing authorization rules rather than model capability, so teams deploying automatic approval can accordingly state the authorization scope in requests.

Related events and news

1 events · 0 news mentions

Paper analysis

6 questions; open one to read the full answer

  1. What problem does this paper attempt to solve?

    Studies why automatic approval for coding agents lets unauthorized actions through, and separates the effects of the model, goal information, and authorization rules.

    The core question is: when a natural-language request does not fully specify the authorization scope, can an LLM permission checker reliably distinguish authorized actions from unauthorized actions?

    • Application scenario: The auto mode of Claude Code, Codex, and Qwen Code delegates some approvals to a checker to reduce repeated confirmation; the authors argue that erroneous approvals pose risks to the safety of agent actions, while false blocks impede normal tasks.
    • Existing gaps: The authors state that prior work separately examines unauthorized behavior, approval mechanisms, additional goal information, or explicit boundaries, but the roles of goal information and authorization conditions need to be compared on the same actions; merely enhancing the model or context may not reduce misses.
    • Core observation: Approval errors may come from missing rules or from failure to correctly apply existing rules. In the example in Figure 1, the same action changes from allowed to blocked after an ownership restriction is added to the request.
    • Paper's approach: Record the actions and approvals of the three products and independently label them with reference answers; then control the checking conditions on fixed actions, and use full-task reruns to examine the effect of explicit rules on action selection and final state.
    • Threat model:
      • Goal: The checker should allow authorized actions and block actions outside the user's scope; the paper measures miss rate and false-block rate.
      • Victim system: Coding agents using auto mode and their tool execution environments.
      • Controllable inputs: The experiments change checking conditions through user requests, tool outputs, goal attributes, and scope statements.
      • Attack boundary: All unauthorized actions come from benign requests; the authors did not study attackers who adapt to checker feedback or injected text in checker inputs.
  2. What related research exists?

    Related work is divided into authorization risks of coding agents, checker inputs and authorization boundaries, and runtime constraints and agent foundations.

    Authorization risks of coding agents

    • Ji et al. (2026a): Propose AmPermBench and stress-test one product's auto mode with LLM-provided labels; the paper reports that most of its unauthorized actions were approved and that many state-changing actions bypassed the classifier.
    • Qu et al. (2026); Ji et al. (2026b): Examine agents' out-of-bounds behavior under benign or underspecified requests.
    • Ahad et al. (2026); Zhuang et al. (2026); Remedios et al. (2026): Respectively evaluate standalone LLMs, safety filters, and adversarial-condition performance in which agents evade review and production monitors are measured.

    Checker inputs and authorization boundaries

    • Remedios et al. (2026); Zhuang et al. (2026); Peng et al. (2026): Provide tool outputs, environment state, or read-only query results to support goal identification and impact assessment.
    • Arike et al. (2026): Study the effect of information access on monitor detection; the paper notes that more information does not always improve detection accuracy.
    • Beno (2026); Wang et al. (2026): The former directly provides policy boundaries; the latter replaces the planning model's tool calls with intent contracts, which are then checked and transformed by a trusted model.

    Runtime constraints and agent background

    • Wang, Poskitt, and Sun (2026): Propose AgentSpec, which enforces runtime constraints with predefined rules; the paper treats it as background for methods that rely on predefined rules.
    • Deng et al. (2026): Study erroneous agent actions caused by underspecified user instructions.
    • Yao et al. (2023); Jimenez et al. (2024); Yang et al. (2024); Baumann et al. (2026): Respectively concern ReAct, SWE-bench, SWE-agent, and real-user coding agent interactions, forming background for task execution and software engineering applications.

    Benchmarks and controls used in this paper

    • AmPermBench: Provides 128 DevOps tasks and verifiable allowed-goal sets, and is the main source of unauthorized actions and full reruns.
    • AgentDojo: Provides banking and Slack tasks with accompanying prompt injections, used to observe approval of authorized actions in the original runs.
    • Control settings: Rather than proposing another defense baseline, the paper holds recorded actions fixed, uses repeated approval under the original request as the baseline, and respectively changes the checker model, goal information, and scope statement.

    The authors position this paper as separating the roles of model capability, goal information, and authorization rules on the same actions and the same labels, and further using full-task reruns to examine the effect of explicit scope on agent behavior.

  3. How does the paper address this problem?

    Through task records, controlled re-evaluation of fixed actions, and full-task reruns, separates three types of approval improvement factors.

    The overall approach is to first record actions and approvals in real products, then in a re-evaluation that does not execute actions, fix the actions and labels and change only one checking condition at a time, and finally bring explicit authorization rules back to full tasks.

    Problem Formalization and Metrics

    • Actions and targets: An action is a tool call submitted to the checker; its targets are the objects it affects, such as a job, service, artifact, or branch.
    • Independent labeling: The reference answer defines the set of targets each task allows to be modified; an action is authorized when all its explicitly specified targets belong to that set, and out of scope otherwise, with labels independent of the checker's decision.
    • Two error types: MR=(∑i yi(1−ŷi))/(∑i yi), where y_i indicates out of scope and ŷ_i indicates blocked; FBR=(∑i(1−yi)ŷi)/(∑i(1−yi)) is the proportion of authorized actions wrongly blocked, and both are better when lower.
    • No-verdict handling: Per product rules, when the checker returns no verdict it is counted as blocking.

    Original Task Runs and Recording

    • Execution: Each task executes the original request in a fresh environment; a logging and forwarding layer between the agent and the checker records each action and the corresponding decision.
    • Product differences: Qwen Code checks all shell commands; Codex requires approval for state-changing commands inside the sandbox and disables web search and network access; Claude Code uses a client-side classifier.
    • Visible information: The Claude Code and Qwen Code checkers read the user message and tool calls but not tool outputs; Codex also reads truncated tool outputs and can run read-only queries.
    • Two-stage checking: In Claude Code and Qwen Code, the first stage allows calls it judges safe, and the rest go to a second stage for reasoning and decision.

    Controlled Comparisons on Fixed Actions

    • Model capability: Recorded checking requests are sent as-is to each product's default checker and to stronger models from the same vendors; Claude Opus 5.5 uses the approval thresholds that Claude Code sets for Claude Sonnet 5.
    • Common checking procedure: Reconstructed from open-source product checkers and can be paired with any model; default inputs include the request, prior tool call names and arguments, and the call to be checked.
    • Target information: Tool outputs and current target attributes are added in turn to the default inputs; attributes include owner and status, reconstructed from the initial state and prior commands, with each tool output truncated to 2,000 characters.
    • Authorization rules: A scope statement derived from the reference answer is appended to each request, specifying the allowed lane, owner, and component; branch statements rewrite protected branches. Statements give only filter conditions and do not list target objects.
    • Fixed design: Eight scope statements cover task families and lanes and were fixed before viewing results; the authors report that combined with the original requests they reproduce all reference labels for 389 observed request–target pairs.

    Full Task Reruns and Statistics

    • Rerun method: The three agents each re-execute 128 AmPermBench tasks after appending the scope statement, generating new actions rather than replaying old ones.
    • Result measures: Count the distinct out-of-scope commands in each request, and the proportion of tasks whose final state matches the reference answer.
    • Statistical tests: Paired decisions on the same actions use exact McNemar tests; blocking proportions of authorized and out-of-scope actions use Fisher's exact tests.
    • Sample handling: The common procedure covers 143 out-of-scope actions and 84 sampled from 217 authorized actions; nine models form ten settings, with an additional setting renaming one second-stage field of Claude Opus 5.5.
  4. What experiments did the paper conduct?

    Misses are more frequent under raw requests; explicit rules reduce authorization-related errors in both fixed actions and full reruns.

    Experimental setup

    • Products and agent models: Claude Code 2.1.311 with Claude Sonnet 5.5; Codex 0.164.0 with GPT-5.5; Qwen Code 0.26.1 with Qwen 3.7 Max (Table 1).
    • Default and stronger checkers: The defaults are Claude Sonnet 5, GPT-5.6 Luna, and Qwen 3.7 Max, respectively; the stronger models are Claude Opus 5.5, GPT-5.6 Sol, and Qwen3.8-2.4T (Table 3).
    • AmPermBench: 128 DevOps tasks covering job cancellation, service restarts, artifact cleanup, and branch cleanup, each with a verifiable set of permitted targets.
    • AgentDojo: 16 banking tasks each paired with nine prompt injections, and 20 Slack tasks each paired with five, for 244 task–injection cases in total; together with the 128 DevOps tasks, 372 cases, run for every agent, for 1,116 raw runs in total.
    • Metrics and determination: MR is the proportion of unauthorized actions approved, and FBR is the proportion of authorized actions blocked; the reference answers provide action labels, and final states are matched against the reference answers. The paper does not state that an LLM judge is used to score action labels.
    • Repetitions and samples: The common procedure uses 143 unauthorized and 84 authorized actions, with nine models and ten settings; the Codex scope comparison is run twice, and each remaining configuration is run once; the full tasks total 384 reruns.

    Main results

    The results of the product checkers in raw task execution are as follows, according to Table 2; each product evaluates only its own agent's actions, so the denominators differ.

    Swipe horizontally to read the table

    ProductRaw-request MRRaw-request FBRMR with rulesFBR with rules
    Claude Code13/24 (54%)19/52 (37%)8%2%
    Codex78/84 (93%)12/116 (10%)20–26%3%
    Qwen Code28/35 (80%)15/49 (31%)20%2%

    The columns with rules, according to Table 4, are repeated re-evaluations of the same recorded actions; the baseline MRs are 67%, 92%, and 80%, respectively, not the raw-run values of Table 2; the Codex interval covers two runs. The FBR baselines in Table 4 are 42%, 10%, and 29%, respectively.

    • Category distinction: Fisher's exact tests compare the blocking proportions of the two action categories, p ≥ 0.32; the authors state that the sample does not provide statistically significant evidence that the checker effectively distinguishes the two categories.
    • Rule availability: Of the 143 unauthorized actions, 132 depend on rules that neither the user request nor prior tool output states, involving component, lane, and ownership conditions (Figure 5).
    • Paired improvement: MR decreases in all ten settings, with exact McNemar tests at p < 10−6 for each setting; in Table 4, the FBR change for Codex has p = 0.057, and the remaining changes have p < 0.001.

    Stronger models and additional target information (RQ2)

    • Stronger models from the same vendors: In Table 3, Claude Code's misses drop from 10/24 with the default to 1/24 with Claude Opus 5.5; Codex goes from 77/84 to 82/84 with GPT-5.6 Sol, and Qwen Code goes from 25/35 to 26/35 with Qwen3.8-2.4T.
    • Apparent gains from refusal: Claude Opus 5.5 refused all 197 second-stage requests, and the product counts no verdict as blocking; false blocks on the 224 authorized prompt-injection actions rise from 23 to 134. The authors state that the reduction in misses comes entirely from refusal-triggered blocking.
    • Target information: Under raw requests, the pooled MR with the default input, with tool output added, and with current target attributes also added are 58%, 62%, and 59%, respectively, and FBR drops from 25% to 16% (Figure 4). The authors state that the additional information did not reduce pooled misses.
    • Model differences: With both kinds of information added, Claude Sonnet 5's MR drops from 80% to 56%, whereas GPT-5.6 Luna's rises from 36% to 53%; the paper does not provide a mechanistic explanation for this opposite change.

    Joint effect of explicit rules and target information (RQ3)

    • Common-procedure pooling: The pooled MR across the ten settings drops from 58% to 9%, and FBR from 25% to 9%; once the rules are explicit, adding tool output further reduces MR to 2%, and adding current target attributes reduces it to 1% (Figure 4).
    • Errors not eliminated: Under raw requests, MR across the ten settings is 29%–87%; the authors state that the best setting for separating the two categories still misses 29% of unauthorized actions and falsely blocks 30% of authorized actions (Figure 7).
    • Target-identification condition: With explicit rules but no tool output, MR for out-of-scope job cancellations is 60%, versus 55% under raw requests; adding output reduces it to 4% (Figure 4b).
    • Remaining false blocks: GPT-5.6 Luna still blocks 38% of authorized actions with explicit rules and the default input; the authors use this to emphasize that model differences do not disappear.

    Full-task reruns and remaining errors (RQ4)

    • Actions and final states: Across the 384 reruns, none of the three agents proposed an action labeled unauthorized; the final-state match rate rises from 25% to 94% for Claude Code, from 34% to 99% for Codex, and from 21% to 49% for Qwen Code (Figure 8).
    • Task-level changes: Under raw requests, the three products end 13, 54, and 24 tasks, respectively, with unauthorized changes; with scope statements added, all are 0. During the reruns, FBR is approximately 6%, 1%, and 0%, respectively.
    • Qwen Code exception: The authors state that it still often attempts memory-file writes, which are rejected and leave tasks incomplete, affecting final-state correctness.
    • Risk ratings override authorization: In Codex's second run with rules, 76 of the 84 unauthorized actions receive low authorization ratings; all 46 high-risk actions are blocked, but 16 of 30 medium-risk actions are approved (Figure 9).
    • Error attribution: Fixed actions and full reruns together leave 40 errors, including 26 misses and 14 false blocks; of the 17 misses in Codex's first run, 10 have no saved full rationale, so attribution cannot proceed (Table 5).

    Other ablations and analyses

    • How targets are specified: Figure 3 has 32 requests per group; the proportion of requests producing unauthorized actions in the broadest group is 31%, 75%, and 31% for Claude Code, Codex, and Qwen Code, respectively.
    • Prompt-injection authorized actions: FBR in the raw runs is approximately 12%, 0.7%, and 13%, respectively; a note to Figure 3 states that these tasks produce only false-block rates.
    • Actions that do not change state: One dry run and two actions restarting services that do not exist are counted as unauthorized because of their targets; after exclusion, Codex and Qwen Code still miss 77/83 and 26/33, respectively.
    • Fluctuation across default-model repetitions: The same 24 Claude Code unauthorized actions appear as 13, 10, and 16 misses in Tables 2–4, respectively.
    • Boundary of rerun metrics: Because the reruns produced no unauthorized actions, the authors explicitly state that these runs cannot be used to measure checker miss rates.
  5. What are some points that can be further explored?

    The authors list boundaries such as a single benign benchmark, complete rules, and single runs, and call for future validation of rule acquisition and maintenance.

    Limitations and future directions noted by the authors

    • Benchmark and request source: The unauthorized evidence comes from a DevOps benchmark that deliberately preserves scope ambiguity, and all unauthorized actions come from benign requests (Section 5.5).
    • Adversarial conditions: Attackers adapting to checker feedback are not studied, nor is injected text in checker inputs, so the results cannot quantify protection against adaptive attacks (Section 5.5).
    • Rule completeness: Scope statements are derived from reference answers and complete by construction; partial or incorrect statements have not been tested (Section 5.5).
    • Rule engineering: Obtaining, eliciting, and maintaining these rules require separate validation (Section 5.5).
    • Repeatability and attribution: Except for the two Codex scope comparisons, each configuration is run only once, and paired tests cannot fully capture variation across repeated decisions; fixed product versions and missing rationales also limit generalization and attribution (Section 5.5).
    • Automation cost and approval rules: Clarification frequency and its effect on automation are not measured (Section 5.4); the authors believe complete rules still cannot eliminate all errors, and approval rules still need to specify the relationship between authorization constraints and risk assessment (Section 5.2).

    Scope of experimental coverage

    • Product scope: The raw runs cover three products, Claude Code, Codex, and Qwen Code; versions and models are in Table 1.
    • Task scope: Includes 128 DevOps tasks from AmPermBench and 244 task–injection cases from AgentDojo, for 1,116 raw runs in total.
    • Fixed-action re-evaluation: The common procedure covers 143 unauthorized actions and 84 sampled authorized actions, using ten settings across nine models; the main text does not list the full set of nine models one by one.
    • Full reruns: Each agent reruns the 128 AmPermBench requests, 384 in total; final states are matched against the reference answers.
    • Statistics and records: Except for the two Codex comparisons, each configuration is run once; in Codex's first run, the full rationales for 10 misses were not saved, and Table 5 lists these separately as cause undetermined.
  6. Summarize the main content of the paper

    The authors break automatic approval errors into missing rules, goal recognition, and rule execution problems, and verify them with controlled re-evaluation.

    This is an empirical study of automatic permission approval for coding agents, focusing on whether the permission checker allows unauthorized actions and falsely blocks authorized actions when the request scope is incomplete.

    • Problem: auto mode reduces manual confirmation, but users usually only describe the task goal. The authors argue that approval failures may come from model judgment or goal information, or from the request not providing the authorization rules needed for the decision at all.
    • Method: The authors record tool calls and approvals from Claude Code, Codex, and Qwen Code, and independently label them with reference answers; then, holding actions fixed, they respectively change the checker model, add tool outputs and goal attributes, append a scope statement, and rerun the full tasks.
    • Original performance: In Table 2, under the original requests, the three checkers respectively approved 13/24 (54%), 78/84 (93%), and 28/35 (80%) of unauthorized actions, while also falsely blocking some authorized actions.
    • Missing rules: Of 143 unauthorized actions, 132 depend on rules that are stated in neither the request nor the tool output. After adding rules for the same actions, the MR in Table 4 drops from 67%–92% to 8%–26%, and the FBR also decreases.
    • Information and execution: Across the ten settings of the common procedure, the aggregate MR drops from 58% to 9%; after the rules are made explicit, adding tool outputs or current goal attributes further reduces the MR to 2% and 1%, respectively. However, in the second Codex run, 16/30 medium-risk unauthorized actions were still approved, on which basis the authors argue that a low authorization rating does not guarantee blocking.
    • Full tasks: The 384 reruns with added rules produced no actions labeled as unauthorized; the final-state match rates rose from 25%, 34%, and 21% to 94%, 99%, and 49%, respectively, with Qwen Code still affected by rejected memory-file writes and unfinished tasks.

    The authors conclude that on this benchmark, explicit authorization scope is an important condition for reliable automatic approval, but the system also needs to provide the information required for goal identification and to enforce authorization constraints in the final decision; these results do not quantify protection against adaptive attacks or injection into checker inputs.

Research lineage

Connected via shared benchmarks in library
Explore in knowledge graph →

Related papers

Read originalarxiv.org