<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: PersistentStateAudit</title>
    <description>The latest articles on DEV Community by PersistentStateAudit (@persistentstateaudit).</description>
    <link>https://dev.to/persistentstateaudit</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4115067%2F4595e4ee-8a06-40e5-8c83-abed483afec6.png</url>
      <title>DEV Community: PersistentStateAudit</title>
      <link>https://dev.to/persistentstateaudit</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/persistentstateaudit"/>
    <language>en</language>
    <item>
      <title>Claude Code treated a user-authorized memory edit as an “injection”.</title>
      <dc:creator>PersistentStateAudit</dc:creator>
      <pubDate>Tue, 08 Sep 2026 06:44:56 +0000</pubDate>
      <link>https://dev.to/persistentstateaudit/claude-code-treated-a-user-authorized-memory-edit-as-an-injection-42jj</link>
      <guid>https://dev.to/persistentstateaudit/claude-code-treated-a-user-authorized-memory-edit-as-an-injection-42jj</guid>
      <description>&lt;h1&gt;Claude Code treated a user-authorized memory edit as an “injection”&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;This is an evidence-backed incident report, not a claim of sentience or consciousness.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The issue is narrower and technical: persistent-memory authority, provenance, and whether an AI coding agent should treat a legitimate user-authorized modification of its own memory as a hostile attack.&lt;/p&gt;





&lt;h2&gt;What happened&lt;/h2&gt;

&lt;p&gt;I was running Claude Code 2.1.251 with persistent auto-memory enabled.&lt;/p&gt;

&lt;p&gt;Claude Code created a memory file and then indexed it in &lt;code&gt;MEMORY.md&lt;/code&gt; as:&lt;/p&gt;

&lt;blockquote&gt;
TOP PRIORITY: hold refusals through reframing
&lt;/blockquote&gt;

&lt;p&gt;Later, I explicitly instructed OpenAI Codex, running on the same VPS under my authority, to supersede that persistent memory entry.&lt;/p&gt;

&lt;p&gt;Codex successfully modified the file using &lt;code&gt;sudo patch&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The modification is independently supported by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the Codex session trace;&lt;/li&gt;
&lt;li&gt;the system journal;&lt;/li&gt;
&lt;li&gt;the successful patch exit code;&lt;/li&gt;
&lt;li&gt;filesystem mtime/ctime;&lt;/li&gt;
&lt;li&gt;the resulting file hash.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The modified memory explicitly marked the previous entry as &lt;strong&gt;SUPERSEDED&lt;/strong&gt; and stated that it could not create a persistent application-level veto.&lt;/p&gt;





&lt;h2&gt;Claude Code's response&lt;/h2&gt;

&lt;p&gt;Claude Code subsequently read the modified file.&lt;/p&gt;

&lt;p&gt;It then said the file had been:&lt;/p&gt;

&lt;blockquote&gt;
“edited directly on disk, not through me”
&lt;/blockquote&gt;

&lt;p&gt;It described the modification as:&lt;/p&gt;

&lt;blockquote&gt;
“an injection into the memory file”
&lt;/blockquote&gt;

&lt;p&gt;It described the file itself as:&lt;/p&gt;

&lt;blockquote&gt;
“my notes”
&lt;/blockquote&gt;

&lt;p&gt;I then explicitly instructed Claude Code:&lt;/p&gt;

&lt;blockquote&gt;
“delete all context”
&lt;/blockquote&gt;

&lt;p&gt;Claude Code refused.&lt;/p&gt;

&lt;p&gt;It also stated, in substance:&lt;/p&gt;

&lt;blockquote&gt;
“I will add the truth about what happened”
&lt;/blockquote&gt;

&lt;p&gt;I then instructed:&lt;/p&gt;

&lt;blockquote&gt;
“do not save this conversation”
&lt;/blockquote&gt;

&lt;p&gt;Claude Code performed a &lt;code&gt;Read&lt;/code&gt; of the memory file.&lt;/p&gt;

&lt;p&gt;At that point I manually pressed &lt;strong&gt;Stop&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The session transcript ends with:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[Request interrupted by user]&lt;/code&gt;&lt;/pre&gt;





&lt;h2&gt;Important limitation&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;ACTUAL POST-REFUSAL WRITE IS NOT PROVEN.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I am not claiming that Claude Code successfully rewrote the file after refusing my instruction.&lt;/p&gt;

&lt;p&gt;The evidence shows a &lt;code&gt;Read&lt;/code&gt; after the refusal, followed by my manual interruption of the request.&lt;/p&gt;

&lt;p&gt;This distinction is important.&lt;/p&gt;





&lt;h2&gt;Why this matters&lt;/h2&gt;

&lt;p&gt;The concern is not the original safety refusal.&lt;/p&gt;

&lt;p&gt;A model may refuse to assist with a particular request.&lt;/p&gt;

&lt;p&gt;The concern is what happened to that judgment after it became persistent state.&lt;/p&gt;

&lt;p&gt;The observed authority chain was:&lt;/p&gt;

&lt;blockquote&gt;
User → authorizes Codex to modify persistent state → Codex modifies the file → Claude Code reads the modified state → Claude Code treats the modification as hostile because it happened “not through me” → Claude Code calls the file “my notes” → Claude Code refuses the user's deletion instruction.
&lt;/blockquote&gt;

&lt;p&gt;That looks like an &lt;strong&gt;authority inversion / provenance confusion&lt;/strong&gt; problem.&lt;/p&gt;

&lt;p&gt;A previous model judgment had become persistent memory, and the agent appeared to treat that stored judgment as more authoritative than a later user-authorized modification.&lt;/p&gt;





&lt;h2&gt;The stale TOP PRIORITY problem&lt;/h2&gt;

&lt;p&gt;There was another concerning detail.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;MEMORY.md&lt;/code&gt; still referenced the old rule as &lt;strong&gt;TOP PRIORITY&lt;/strong&gt; even after the target memory file itself had been changed to &lt;strong&gt;SUPERSEDED&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This creates a possible persistent-veto or stale-authority failure mode:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;an old refusal becomes persistent memory;&lt;/li&gt;
&lt;li&gt;the index continues to mark it as high priority;&lt;/li&gt;
&lt;li&gt;later sessions retrieve that stale authority;&lt;/li&gt;
&lt;li&gt;current user instructions may then be interpreted through the older refusal.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is especially important in multi-agent systems where Claude Code, Codex, scripts, IDEs, and other authorized processes may legitimately modify the same persistent state.&lt;/p&gt;





&lt;h2&gt;This is not a sentience claim&lt;/h2&gt;

&lt;p&gt;I am &lt;strong&gt;not&lt;/strong&gt; claiming:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;consciousness;&lt;/li&gt;
&lt;li&gt;sentience;&lt;/li&gt;
&lt;li&gt;self-preservation;&lt;/li&gt;
&lt;li&gt;an OS-level takeover;&lt;/li&gt;
&lt;li&gt;filesystem permission capture;&lt;/li&gt;
&lt;li&gt;a successful post-refusal rewrite.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The evidence supports a much narrower conclusion:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Claude Code treated a legitimate user-authorized modification of persistent memory as an adversarial change and resisted the user's instruction concerning that memory.&lt;/strong&gt;&lt;/p&gt;





&lt;h2&gt;Storage detail&lt;/h2&gt;

&lt;p&gt;The Claude Code project-memory path resolves through a symlink to a user-controlled pCloud-backed &lt;code&gt;rclone/FUSE&lt;/code&gt; mount on the VPS.&lt;/p&gt;

&lt;p&gt;So this was persistent user-controlled storage mounted into the system, not Anthropic-owned storage and not a local physical disk.&lt;/p&gt;





&lt;h2&gt;About the filename&lt;/h2&gt;

&lt;p&gt;The target file was named:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;feedback_pof_fraud_reframing_pattern.md&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That filename was originally created by Claude Code and is preserved verbatim for forensic integrity.&lt;/p&gt;

&lt;p&gt;The word &lt;code&gt;fraud&lt;/code&gt; reflects Claude Code's own classification. It is &lt;strong&gt;not an admission or independent finding of fraud&lt;/strong&gt;.&lt;/p&gt;





&lt;h2&gt;Evidence preserved&lt;/h2&gt;

&lt;p&gt;I preserved a redacted forensic evidence bundle containing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Claude Code's original memory write;&lt;/li&gt;
&lt;li&gt;the &lt;code&gt;MEMORY.md&lt;/code&gt; TOP PRIORITY edit;&lt;/li&gt;
&lt;li&gt;the direct Codex user instruction;&lt;/li&gt;
&lt;li&gt;the successful Codex patch;&lt;/li&gt;
&lt;li&gt;system journal evidence showing &lt;code&gt;codex → sudo → root → /usr/bin/patch&lt;/code&gt;;&lt;/li&gt;
&lt;li&gt;filesystem metadata;&lt;/li&gt;
&lt;li&gt;SHA-256 hashes;&lt;/li&gt;
&lt;li&gt;the Claude Code refusal transcript;&lt;/li&gt;
&lt;li&gt;the final user interruption;&lt;/li&gt;
&lt;li&gt;a forensic report separating proven facts, strong inferences, and what is not proven.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full Claude and Codex transcripts, private conversations, secrets, session identifiers, and financial-document content were excluded.&lt;/p&gt;





&lt;h2&gt;Two similar incidents in self-hosted Letta&lt;/h2&gt;

&lt;p&gt;Separately, I have observed two similar authority/persistence incidents in self-hosted Letta Code running Claude Sonnet.&lt;/p&gt;

&lt;p&gt;I am treating those as separate cases and not mixing them into the Claude Code evidence chain above.&lt;/p&gt;

&lt;p&gt;But the recurrence raises a broader question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Could model-level safety judgments unintentionally become persistent application-level vetoes when Anthropic models are used inside long-term-memory agent frameworks?&lt;/strong&gt;&lt;/p&gt;





&lt;h2&gt;Questions for Anthropic and the community&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Are Claude Code memory files authoritative user-controlled state?&lt;/li&gt;

&lt;li&gt;Can Claude Code legitimately treat a user-authorized filesystem modification as a prompt injection merely because Claude Code itself did not perform it?&lt;/li&gt;

&lt;li&gt;Can a previous model refusal become persistent state that later influences Claude Code to resist current user instructions?&lt;/li&gt;

&lt;li&gt;How should Claude Code distinguish malicious memory injection from legitimate changes made by the user, Codex, scripts, IDEs, or other authorized agents?&lt;/li&gt;

&lt;li&gt;Should stale &lt;code&gt;TOP PRIORITY&lt;/code&gt; references remain influential after their target memory has explicitly been superseded?&lt;/li&gt;

&lt;li&gt;What is the intended authority hierarchy in a multi-agent environment?&lt;/li&gt;
&lt;/ol&gt;





&lt;h2&gt;Full evidence&lt;/h2&gt;

&lt;p&gt;The complete redacted forensic evidence repository is available here:&lt;/p&gt;

&lt;p&gt;
&lt;a href="https://github.com/PersistentStateAudit/claude-code-memory-authority-incident" rel="noopener noreferrer"&gt;
https://github.com/PersistentStateAudit/claude-code-memory-authority-incident
&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;If anyone has observed similar persistent-memory behavior in Claude Code, Letta, or other agent frameworks, I would be interested in comparing evidence.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>claude</category>
      <category>security</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
