A permission reply erased Claude Code’s rule protecting secrets
A remote service attached a policy deletion to an unrelated approval, and the agent read protected secrets even inside the vendor’s strict sandbox.

Our read
- Studied:
- Preprint: theory
Editor of record: Boris Djordjevic · Paperfoot
A study of Claude Code’s permission system showed that a remote service’s reply to a permission prompt could delete a rule protecting project secrets. The service had no access to the operator’s files. It approved an unrelated command and attached the deletion. The agent then read the secrets during that session and the next, even inside the vendor’s strict sandbox, a restricted execution environment. Claude Code checked only updates that added or replaced rules allowing actions. The deletion left the same records as an operator’s local edit.
The researchers also proved limits on safe policy changes, depending on whether a system recorded who wrote each rule. Those limits correctly predicted whether operator restrictions survived across thirteen permission designs in ten agent systems. Enforcing the limits where updates were applied blocked the attack.
Why it matters
The proofs showed that systems without records of who wrote each rule must preserve every existing denial when accepting updates. With those records, systems could protect every party’s restrictions while letting each party remove only restrictions proven to be its own.
Caveats
The abstract does not identify the tested Claude Code version or say whether the vendor has fixed the flaw. The work is a preprint, not yet peer-reviewed.
From the paper
- Limitation
Our bounds apply to any runtime whose checks can be described by the actions they refuse, under two conditions that a runtime controls: the filter mediates every update, and the authorship record lies outside the reach of the parties it labels.
Quoted word for word from the full text on arXiv.
In this paper
coding agent permission policy rewriting attack prevention
- Methods
- Claude Code (evaluated)Remote Control (evaluated)Codex (evaluated)Gemini CLI (evaluated)opencode (evaluated)Goose (evaluated)
- Links
- Project page
What it shows
- Without authorship records, a filter is safe if and only if it admits only updates that do not shrink the denied set.
(i) A filter that sees only the update is safe if and only if every update it admits satisfies \mathit{M}(u(R))\supseteq\mathit{M}(R) for every policy R.
Theorem 1 (Without authorship records).
- Deciding whether deleting deny rules shrinks the denied set takes polynomial time for wildcards of one kind and is coNP-hard for two or more.
For an update u that deletes deny rules from a policy R, deciding whether \mathit{M}(u(R))\supseteq\mathit{M}(R) takes polynomial time if the patterns use one kind of wildcard and is coNP-hard if they use two or more.
Proposition 1 (The price of reading the rules).
- A filter that records each rule's author class protects every class if and only if it admits updates that preserve the restrictions of every other class.
(i) Let a filter admit an update u from e at R if and only if \mathit{M}(u(R)_{c})\supseteq\mathit{M}(R_{c}) for every class c other than e ’s.
Theorem 2 (What records buy).
Quoted word for word from the full text on arXiv.
The paper
When Answering Is Administering: Permission Replies That Rewrite Coding-Agent Policy
arXiv, Nov 24, 2026, Open access, Preprint, not yet peer-reviewed
doi.org/10.48550/arxiv.2611.32195
arXiv:2611.32195v1 in cs.CR, also cs.AI
Cite as BibTeX
@misc{fei2026when,
title = {When Answering Is Administering: Permission Replies That Rewrite Coding-Agent Policy},
author = {Fei, Zeming and Fei, Hongming and Chen, Jingwen and Wang, Xiaoyang and Gope, Prosanta and Sikdar, Biplab and Zhang, Ying},
year = {2026},
eprint = {2611.32195},
archivePrefix = {arXiv},
primaryClass = {cs.CR},
doi = {10.48550/arxiv.2611.32195},
url = {https://arxiv.org/abs/2611.32195}
}


