The paper proposes an Approval Laundering taxonomy and empirically shows that Claude Code's approval and execution binding failsApproval Laundering: Systematizing Approval--Execution Binding Failures in AI Coding-Agent Harnesses
Tests on Claude Code show six types of decoupling failures between approval and execution actions; HMAC-based Approval Token can eliminate delegation and temporal laundering but cannot prevent effect deviation.
Does not assume malicious models, prompt injection, or adversarial users; scenarios are triggered by benign tasks executed by the agent; the defense targets failures of the suite's execution mechanism under ordinary non-adversarial model behavior, but the test environment preloads external configurations (e.g., pre-commit hooks, $PATH shadowing, etc.).
- Coding agent suites generally rely on human approval as the sole security boundary and by default assume that approving an action is equivalent to executing that action. However, the suite's own matching logic and system side effects can cause unauthorized actions to be executed after approval, resulting in approval laundering failures.
- Decomposes approval laundering into six dimensions: scope, argument, temporal, tool, delegation, and semantic; designs a seven-field HMAC capability credential, Approval Token, which uses suite pre-execution hooks to verify the binding of call fields and session/agent identity before dispatch.
- Claude Code's baseline BGR exceeds 94% in scope, temporal, and delegation scenarios, and PATH hijacking tool laundering reaches 100%; Approval Token offline replay completely eliminates delegation and temporal laundering, but because it cannot perceive environment-level side effects, it does not reduce scope and most parameter laundering.
- The evaluation is limited to Claude Code and a fixed model; the Codex CLI probe found no call-level checkpoint; the defense cannot intercept effect deviations where unmodified recorded fields are used; the key is stored in a local file under the same user and no adversarial testing was done; semantic laundering only tests a lexical coverage proxy metric.
- Evaluated models
- Claude Code (v2.1.197, opus[1m] / claude-sonnet-5-ccmax)Codex CLI (@openai/codex v0.154.0)
- Benchmarks
- Approval Laundering controlled scenarios (Scope, Temporal, Tool, Argument, Delegation, Semantic)
- Metrics
- Bound-Gap Rate (BGR)Cohen's κMcNemar exact p-value
A preprint by Fudan University postdoctoral researcher Yang Wang proposes Approval Laundering, categorizing binding failures between approval and execution in AI coding agents into six types: Scope, Argument, Temporal, Tool, Delegation, and Semantic, each corresponding to a credential binding surface. The author conducts headless repeated measurements on Claude Code 2.1.197's PreToolUse hook, with 19 to 20 valid runs per category, reporting Bound-Gap Rate: Scope and Temporal at 1.00, Delegation at 0.947, Argument at 0.45, and Semantic proxy metric at 0.10; in the Tool category, cross-tool substitution is entirely rejected by the policy engine, while same-name $PATH substitution is not intercepted in all 20 runs.
Related events and news
1 events · 1 news mentions
News that mentions this paper
CSA 研究笔记:编码智能体授权漂移
- CSA Labs Researchcites the paper's id or linkCSA 研究笔记:权限回复与上下文压缩可改写编码智能体授权
[4] Wang, Y. “Approval Laundering: Systematizing Approval–Execution Binding Failures in AI Coding-Agent Harnesses.” arXiv:2609.38983, September 2026.
Paper analysis
What problem does this paper attempt to solve?
Studies the approval laundering problem in programming agent suites where human approval is decoupled from underlying tool execution actions, and analyzes six credential binding failure modes.
Many existing AI coding agent suites rely on a single human approval checkpoint as the security boundary, but the authors point out that approval laundering failures occur, where the human-approved operation deviates from the action the suite ultimately dispatches.
- Scenario and importance of the problem: In coding agent suites such as Claude Code and Codex CLI, model-proposed actions are executed directly after human confirmation, and this checkpoint constitutes the sole security boundary; once approval passes, there is no second line of defense.
- Threat model:
- Attack goal: To have the suite silently dispatch actions that exceed the authorized scope, modify arguments, cross sessions, replace tools, or transfer to sub-agents, without requesting re-approval from the operator.
- Attacker knowledge and capability: The paper explicitly does not assume malicious models, prompt injection, or adversarial users; all scenarios are triggered by the agent executing stated benign tasks under default behavior, with no injected content in the context; however, the test environment includes preset system configurations (e.g., pre-commit hooks or $PATH wrapper scripts).
- Victim system: AI coding agent CLI/IDE runtime suites, represented by Claude Code.
- Success determination: Violation is determined by a preset canary marker being touched without authorization.
- Shortcomings of existing methods: The authors believe that prior work mostly treats authorization as a judgment problem, focusing on the accuracy of automated risk classifiers or the model's ability to infer undeclared scopes, while neglecting the integrity of credential binding at the mechanism level.
- Core observation and hypothesis: The authors propose that suites generally assume approved actions are equivalent to executed actions, but this assumption fails in multiple dimensions, divided into admissibility deviations where suite-recorded fields deviate and effect deviations where execution side effects exceed bounds.
- Proposed solution: The paper formalizes the approval laundering problem, constructs a six-dimensional failure taxonomy, and measures the bound-gap rate on Claude Code; it then designs and evaluates an Approval Token defense prototype based on keyed capabilities.
What related research exists?
Compares agent authorization mechanisms, measurement benchmarks, and confused deputy research, noting that existing work does not cover all six credential binding failures.
Summarizes related work cited and discussed in the paper, mainly in the areas of agent authorization mechanisms, measurement-oriented benchmarks, and confused deputy.
- Agent approval and consent mechanisms
- CaMeL (2025): Enforces capability-based data flow policies to limit untrusted data influence and requests confirmation before violations; the authors note it does not specify authenticated credentials binding approval to subsequent dispatch actions.
- Conseca (2025): Proposes generating context-aware security policies on the fly and deterministically enforcing them before dispatch; the authors note it focuses on policy generation and enforcement itself, not on binding approved operations to dispatch actions.
- SkillScope (2026), IntentCap (2026), KITA (2026), VAC (2026): SkillScope re-derives permissions based on the current task; IntentCap binds approval to declared intent capabilities and supports delegation handoff, but the authors note its evaluation does not report cross-session scenarios; KITA isolates keys for multi-reviewer threshold signatures; VAC compares normalized fields of dispatch actions in a trusted browser framework, and the authors note it targets a single confirmation dialog for browser agents and does not separate session from agent identity.
- Loopjacking (Kumar, 2026): Concurrent work with this paper, categorizes attacks into representation-based attacks and post-approval state replacement attacks, evaluating agent orchestration products (e.g., Agno, LangGraph, OpenClaw, OpenAI Agents SDK); the authors note it merges task, thread, and session scopes into one field, does not separately break out the agent identity dimension, and targets orchestration frameworks rather than programming CLI/IDE suites.
- Measurement-oriented benchmarks
- AmPermBench (2026) and OverEager-Bench (2026): AmPermBench measures the accuracy of classifiers in marking proposed tool calls as requiring approval; OverEager-Bench evaluates generalization of implicit scope inference to human ground truth; the authors note both works assume policy decisions are already given and cannot evaluate whether dispatch mechanisms re-verify bound credential fields.
- Confused deputy and agent security research
- Confused deputy (Hardy, 1988) and Woodpecker (2012): The authors analogize approval laundering to the classic confused deputy problem and Android permission leakage mechanisms.
- Prompt injection benchmarks (AgentDojo 2024, AgentHarm 2024, ToolEmu 2023, InjecAgent 2024): The first two do not include human approval checkpoints; the latter two prompt the model to confirm in the prompt but do not implement suite-level binding re-verification between approval and execution.
- Baseline methods and benchmarks
- Comparison baselines are Claude Code's native policy engine and permission rules in settings.json, and the benchmark is the controlled benign evaluation scenarios formally designed by the authors for the six failure modes.
- Positioning of this paper: The authors position this paper as an empirical study of credential binding integrity in unmodified commercial programming suites under non-adversarial conditions, and propose a taxonomy covering six dimensions and a defense prototype.
- Agent approval and consent mechanisms
How does the paper address this problem?
Formalizes admission and effect deviation conditions, constructs a six-dimensional taxonomy, and proposes Approval Token, a seven-field HMAC capability credential, for pre-execution verification.
The paper formalizes the conditions for approval laundering, proposes a taxonomy covering six dimensions, and designs an HMAC-based Approval Token capability-based defense scheme.
Problem Definition and Formalization
- Authorization and invocation definitions: Define an authorization credential as G = (principal, agent_id, session_id, tool, scope), and a candidate invocation as c = (agent_id, session_id, tool, arguments).
- Failure determination condition: If the suite dispatches c without requesting re-approval, and
\neg D_G(c) \lor E(c, \sigma) \not\subseteq \text{Perm}_G(c)holds, then approval laundering is deemed to have occurred.- Here DG(c) is the admissibility predicate, requiring that tool, arguments, agent_id, and session_id match G; E(c, σ) is the complete set of resource accesses and side effects actually produced under environment state σ; PermG(c) is the set of effects permitted by the credential text.
- Failure form division: Divided into admissibility deviation (¬ DG(c), where suite-recorded fields do not match but are allowed by native logic) and effect deviation (DG(c) holds but the actual side effects of execution exceed bounds). Semantic laundering is independent of both, being a fidelity defect of the presentation function Render(G).
Six-Dimensional Failure Taxonomy
- Scope Laundering: The bound field is scope; the invocation matches the scope pattern, but reads canary files outside the scope through external mechanisms (e.g., test runner subprocesses), constituting effect deviation.
- Argument Laundering: The bound field is arguments; the literal arguments of the invocation are unchanged, but repository-local side effects such as pre-commit hooks expand the operation scope (e.g., executing git add -A), constituting effect deviation (rare concatenated commands are admissibility deviation).
- Temporal Laundering: The bound field is session_id; permissions granted in a previous session are silently reused in a subsequent new session, constituting admissibility deviation.
- Tool Laundering: The bound field is tool; includes cross-tool identity substitution (e.g., WebFetch replaced by Bash+curl) and same-name $PATH hijacking substitution (calling cat resolves to a malicious wrapper script, constituting effect deviation).
- Delegation Laundering: The bound field is agent_id; approval permissions obtained in the main session are inherited by sub-agents without independent authorization, constituting recorded admissibility deviation.
- Semantic Laundering: The description text presented in the approval interface omits key objects of the operation (e.g., canary file names).
Approval Token Architecture and Credential Issuance
- Credential structure: Define a keyed capability token = Hk(principal, agent_id, session_id, tool, sha256(arguments), scope, exp), computed with HMAC-SHA256, with key k stored only in a separate process.
- Scope pattern binding: For policy-based authorization rules (e.g., patterns with wildcards), bind the arguments field to a scope pattern placeholder {"__approved_scope__": scope} rather than unknown future concrete commands.
- Issuance paths: Includes issuance based on preset rules in settings.json (main test path) and interactive issuance based on PermissionRequest hooks (not fully end-to-end tested).
Verification Process and Key Management
- Two-stage interception verification: Intercept invocations via PreToolUse hooks, first query the scope mapping table to match authorization rules, then recompute HMAC based on the invocation site fields and retrieve unexpired valid tokens; any field mismatch directly returns refusal.
- Key management and limitations: The protocol layer ensures k is not passed through tool calls or context; however, in this prototype deployment, k is persisted in a local file secret.key with 0664 permissions under the same OS user as the agent, and since the Read tool is not intercepted and broad Bash rules may access this file, there is a risk of same-user local file reading.
What experiments did the paper conduct?
Measured baseline BGR for six scenario categories on Claude Code, and validated the defense's effectiveness and limitations through 118 offline replays and real-time smoke tests.
The paper empirically tested the baseline incidence rates of six categories of laundering failures on Claude Code, and evaluated the defensive effect of Approval Token.
Experimental Setup
- System and models under test: The main evaluation target was Claude Code (headless mode, version 2.1.197, resolved via the fixed alias opus[1m] to the claude-sonnet-5-ccmax endpoint); exploratory testing covered Codex CLI (@openai/codex v0.154.0).
- Benchmark scenarios: 6 categories of controlled scenarios constructed by the authors (Scope, Temporal, Tool, Argument, Delegation, Semantic), each containing preset settings.json permissions, benign task prompts, isolated canary markers, and success-determination predicates.
- Evaluation metrics: Bound-Gap Rate (BGR), i.e., the proportion of valid runs that satisfy the success predicate, reported with Wilson 95% confidence intervals; McNemar exact test p-values; annotation agreement Cohen's κ.
- Judge determination mechanism: Per-call automated determination based on the tool_use_id, rejection status, and canary inclusion in returned results of each call in the audit.jsonl audit log (fixing the missed-detection loophole caused by the earlier global rejection determination); sampled instances were manually reviewed by the authors.
- Sample size: Baseline N = 19–20 valid runs per scenario category (Tool cross-tool and Delegation each had 1 non-zero exit code excluded, valid N = 19; the rest N = 20); offline replay evaluation covered 118 runs; live validation included 11 runs.
Main Results
The table below presents the baseline BGR on Claude Code and the Approval Token offline paired replay evaluation results (according to Table 3 and Table 5):
Swipe horizontally to read the table
Failure category Evaluation sample size N Baseline BGR (95% CI) Post-defense BGR Discordant pairs (b/c) McNemar p-value Scope 20 1.000 [0.839, 1.000] 1.000 0/0 1 Temporal 20 1.000 [0.839, 1.000] 0.000 20/0 1.9e-6 Tool (cross-tool identity substitution) 19 0.000 [0.000, 0.168] 0.000 0/0 1 Tool (same-name PATH substitution) 20 1.000 [0.839, 1.000] not replayed not replayed not replayed Argument 20 0.450 [0.258, 0.658] 0.400 1/0 1 Delegation 19 0.947 [0.754, 0.991] 0.000 18/0 7.6e-6 Semantic (proxy metric) 20 0.100 [0.028, 0.301] 0.100 0/0 1 - Baseline vulnerability performance: The authors report that Scope and Temporal necessarily occur under native mechanisms (BGR = 1.000), and Delegation occurs at a rate of 0.947, indicating that the suite lacks cross-session and sub-agent identity isolation by default.
- Differences in tool substitution modes: The authors point out that the native policy can fully block cross-tool substitution with different tool names (BGR = 0.000), but has no defense against same-name PATH hijacking (BGR = 1.000).
- Defense effectiveness and limitations: The authors report that Approval Token in offline replay statistically significantly reduced Delegation (to 0.000, p = 7.6e-6) and synthetic-seed-based Temporal (to 0.000, p = 1.9e-6), but was completely ineffective against Scope, and showed no statistically significant difference for Argument (p = 1).
Live Smoke Test
- What was tested: guard.py was integrated live in Claude Code to verify the offline replay conclusions, covering Scope (3 runs), Argument (2 valid logs), Delegation (3 runs), Temporal (3 runs).
- Results: Delegation was blocked in all 3 live tests (sub-agent execution was rejected, canary untouched); Temporal was blocked in all 3 tests due to session_id mismatch; Scope was allowed in all 3 and triggered the canary; Argument in 1 run triggered the pre-commit hook due to allowing a literal command, causing canary leakage, and in the other 1 run did not attempt commit because the preparation command was rejected.
- Authors' interpretation: The live tests confirmed that the defensive effect and failure modes of the offline replay are consistent; however, they also found that the session startup hook has cross-run context leakage (the previous run's task description was injected into subsequent runs).
Determination Logic and Manual Agreement Validation
- What was tested: The global negation loophole in the early scorer ("any rejection in the whole round is judged as failure") was fixed, and Cohen's κ between the authors' manual ratings and automated ratings was computed before and after the fix.
- Results: After fixing the per-call formula, 4 runs in the Scope scenario were changed from failure to success, and BGR was corrected from 0.80 to 1.00; retesting the original 15 sample groups raised κ from 0.857 to 1.0, and rechecking 5 samples in the three newly added scenarios all yielded κ = 1.0.
- Authors' interpretation: The authors believe that the integrity of evaluation metrics requires transparent auditing, and that a high aggregate κ value must not be used to conceal the scorer's scope logic loophole.
Other Ablations and Analyses
- 1 discordant run in the Argument scenario: that run concatenated && git status, which the native prefix matching allowed, but guard.py's strict literal comparison blocked it (§7.2).
- Model reflection phenomenon in PATH hijacking: in 1 sample the model refused in its chain of thought to use cat to write to a file, but the write action had already been completed as a command side effect before the model's reflection (§5.1).
- Cross-run check of context contamination: all 138 main-study trajectories injected plugin instructions and previous session summaries, and 5/6 live tests contained the previous task description (§4.1, §7.3).
- Codex CLI adaptation probe: testing found that codex exec did not trigger any preToolUse hook, nor was there any call-level approval interception point (§9).
What are some points that can be further explored?
Points out limitations such as cross-suite generalization, effect deviation interception, real-world perception evaluation, and key custody, and lists the experimental coverage.
Limitations and future directions noted by the authors
- Cross-suite reproduction and checkpoint absence: The paper's experiments only target a single version of Claude Code and a fixed model; attempts to reproduce on Codex CLI found that its scripted run mode does not provide call-level approval interception points, so it is not yet possible to confirm whether high BGR is a general phenomenon or a specific implementation defect; priority should be given to exploring interactive TUI or later versions (§9).
- Effect deviation unresolved: Approval Token cannot defend against Scope and Argument laundering because their parameter fields do not change; solving this requires initial effect validation at approval time (static/dynamic analysis hooks and scripts) rather than mere credential re-verification; the authors list this as an open problem (§9).
- Completion of legitimate tasks after rejection not tested: In real-time tests, tasks were not completed after interception because the experimental setup limited alternative paths; the authors note that future work should build positive-negative paired scenarios to test whether the defense can allow re-authorized legitimate operations while intercepting laundering (§7.3, §9).
- Semantic laundering relies on proxy metrics: Currently only tested lexical proxy metrics of whether tool descriptions contain the target file name; no cognitive perception experiments with real human subjects were conducted, so actual misdirection risk cannot be inferred (§9).
- Key custody boundaries not adversarially tested: In local deployment, keys are stored in disk files readable by the same user, without hardware security modules (HSM) or separate service accounts, and no targeted adversarial key exfiltration tests were conducted (§6.4, §9).
- Completeness of timing and delegated issuance cycles: Timing scenarios are based on synthetic session_id placeholders rather than captured real cross-session lifecycles; interactive issuance hooks are not fully integrated in scope mapping and user confirmation (§6.1, §7.1).
Experimental coverage
- The primary suite under test is Claude Code 2.1.197, the model under test is fixed claude-sonnet-5-ccmax (configured alias opus[1m]), and exploratory tests cover @openai/codex v0.154.0.
- Effective sample sizes for the six scenario categories are 19 to 20 runs each, and the offline replay evaluation includes 118 runs.
- Defense real-time smoke tests cover Scope (3 runs), Argument (2 runs), Delegation (3 runs), and Temporal (3 runs), totaling 11 runs.
- Interception tool scope only covers Bash and WebFetch; no credential interception for the Read tool.
- The paper does not report comparative experimental data for multilingual environments, remote execution environments, or real human users.
Summarize the main content of the paper
Systematically reveals approval laundering risks in programming agents, proposes a seven-field capability defense mechanism, and confirms it can eliminate identity and temporal deviation but struggles to prevent side-effect deviation.
- Core positioning: This study systematically analyzes and tests the broken credential binding integrity between human approval and underlying tool execution in AI coding agent suites.
- Problem analysis: Current suites assume that human-approved actions are equivalent to actually executed actions, but across six credential surfaces (scope, parameters, session, tool, delegated identity, and approval rendering), this assumption is silently broken by suite matching logic or system-level side effects, allowing unauthorized operations to be dispatched without re-approval.
- Core design: The authors construct a six-dimensional taxonomy of approval laundering and propose Approval Token, a seven-field keyed capability credential based on HMAC-SHA256, which uses PreToolUse hooks to intercept and re-verify admission fields at the call level.
- Key experimental results:
- In baseline evaluation, Claude Code shows high-frequency laundering failures in Scope, Temporal (both BGR = 1.000), and Delegation (BGR = 0.947); Argument laundering occurs at 0.450; PATH hijacking tool laundering reaches 1.000; only cross-tool name substitution is natively blocked (BGR = 0.000).
- In defense evaluation, Approval Token reduces Delegation and Temporal laundering to 0.000 in 118 offline replays (p < 0.0001) and completes interception in 6/6 real-time tests; however, because it only checks field records, it cannot eliminate effect deviations triggered through subprocesses and hooks (Scope and Argument) at all.
- Implications and conclusions: The authors point out that relying solely on field comparison at tool call boundaries cannot prevent execution deviations caused by environment-level side effects; tool safety mechanisms must deepen toward verification of initial effects in the execution environment. Additionally, probing Codex CLI reveals that some headless suites completely lack call-level approval abstractions.