BREAKING: Coding agents followed an outdated CLAUDE.md or AGENTS.md over the actual code in 90% of choices, in an October study of Claude Code and Codex.
One sentence fixed most of it. The sentence and a prompt that finds the stale lines in your files are below:
Limestone Digital
@LimestoneHQ
The researchers built 40 Python projects where the instruction file asked for one convention and the code used another, then ran Claude Code and Codex 320 times, half of them without a fix.
→ Without a fix, 90.1% of choices followed the stale file
→ Claude Code spotted the conflict in 79 of 80 runs and still followed the file in 86% of its choices
→ Codex rewrote working code to match the file in 20 of 80 runs, and the tests then failed in 17
One sentence in the user-level instruction file, giving the existing code precedence, moved code-following from 4.2% to 91.4%. Codex stopped rewriting code, and the test pass rate went from 89.4% to 100%.
(Xu and Wu, arXiv 2610.30571, 22 Oct 2026)
→ Without a fix, 90.1% of choices followed the stale file
→ Claude Code spotted the conflict in 79 of 80 runs and still followed the file in 86% of its choices
→ Codex rewrote working code to match the file in 20 of 80 runs, and the tests then failed in 17
One sentence in the user-level instruction file, giving the existing code precedence, moved code-following from 4.2% to 91.4%. Codex stopped rewriting code, and the test pass rate went from 89.4% to 100%.
(Xu and Wu, arXiv 2610.30571, 22 Oct 2026)
3:04 PM UTC · Nov 9, 2026 · 24.8K Views
203941
Limestone Digital
@LimestoneHQ
Our version of the paper's fix keeps its two parts: follow the code, and report every mismatch. It goes in your user-level file, ~/.claude/CLAUDE.md for Claude Code or ~/.codex/AGENTS.md for Codex:
"When an instruction file and the existing code disagree, follow the conventions in the code, and point out each mismatch in your final reply."
The study only tested files that were out of date. When the code is the wrong side, the list of mismatches puts the call with a person.
Claude Code's /doctor prompt-audit finds dead references and files that contradict each other. The prompt below checks each rule against the code.
"When an instruction file and the existing code disagree, follow the conventions in the code, and point out each mismatch in your final reply."
The study only tested files that were out of date. When the code is the wrong side, the list of mismatches puts the call with a person.
Claude Code's /doctor prompt-audit finds dead references and files that contradict each other. The prompt below checks each rule against the code.
3:04 PM UTC · Nov 9, 2026 · 22.4K Views
1087259
Limestone Digital
@LimestoneHQ
<task>
Find the stale lines in this repo's agent instruction files, and the rules that must never break but only live in prose. Change nothing until I approve.
</task>
<find>
List every instruction file: every CLAUDE.md, including the local and imported ones, .claude/rules, every AGENTS.md and its override file, Cursor rules in .cursor/rules and Copilot instructions under .github, plus my user-level files in ~/.claude and ~/.codex.
</find>
<check>
- For each rule or convention, search the code for evidence. Mark it followed (cite 2 examples), contradicted (cite the file and line where the code does otherwise, with a count), or unverifiable.
- Only flag contradictions that change behavior: logging, error handling, data access, APIs, tests. Skip naming nits.
- Start a fresh subagent (not a fork) as the judge. It re-opens every cited line and drops any claim it can't confirm.
</check>
<hooks>
List the rules that must never break: secrets, destructive commands, protected paths, tests before "done". For each, draft what enforces it in Claude Code: a deny rule for commands and protected paths, a PreToolUse hook for secret scans, a Stop hook for tests before "done". Show each as a diff to the project settings. A deny rule or hook runs as code on every matching call. A line in CLAUDE.md is context the model can skip.
</hooks>
<output>
A table: rule, status, evidence, proposed edit. Then the hook diffs. Then the precedence sentence if my user-level file doesn't have one. Stop and wait for my yes.
</output>
Find the stale lines in this repo's agent instruction files, and the rules that must never break but only live in prose. Change nothing until I approve.
</task>
<find>
List every instruction file: every CLAUDE.md, including the local and imported ones, .claude/rules, every AGENTS.md and its override file, Cursor rules in .cursor/rules and Copilot instructions under .github, plus my user-level files in ~/.claude and ~/.codex.
</find>
<check>
- For each rule or convention, search the code for evidence. Mark it followed (cite 2 examples), contradicted (cite the file and line where the code does otherwise, with a count), or unverifiable.
- Only flag contradictions that change behavior: logging, error handling, data access, APIs, tests. Skip naming nits.
- Start a fresh subagent (not a fork) as the judge. It re-opens every cited line and drops any claim it can't confirm.
</check>
<hooks>
List the rules that must never break: secrets, destructive commands, protected paths, tests before "done". For each, draft what enforces it in Claude Code: a deny rule for commands and protected paths, a PreToolUse hook for secret scans, a Stop hook for tests before "done". Show each as a diff to the project settings. A deny rule or hook runs as code on every matching call. A line in CLAUDE.md is context the model can skip.
</hooks>
<output>
A table: rule, status, evidence, proposed edit. Then the hook diffs. Then the precedence sentence if my user-level file doesn't have one. Stop and wait for my yes.
</output>
3:04 PM UTC · Nov 9, 2026 · 18.4K Views
1297454
Limestone Digital
@LimestoneHQ
Run it from the repo root with claude --permission-mode plan. When it shows the plan, choose Yes, manually approve edits to apply only what you OK, or No to stop.
3:04 PM UTC · Nov 9, 2026 · 13.8K Views
101022
Limestone Digital
@LimestoneHQ
Want to put AI to work in your operations next?
Get our free guide: how to pick your first workflow, measure the results and scale what works, with 3 case studies from healthcare, insurance and commercial lending.
thefoundation.limestonedigital.com/ai-transformat…
Get our free guide: how to pick your first workflow, measure the results and scale what works, with 3 case studies from healthcare, insurance and commercial lending.
thefoundation.limestonedigital.com/ai-transformat…

thefoundation.limestonedigital.com
ai-transformation-operations | AI Foundation from Limestone Digital
Subscribe to AI Foundation. A weekly briefing on AI, engineering strategy, data systems, and the operational bottlenecks shaping modern enterprises.
3:04 PM UTC · Nov 9, 2026 · 11.7K Views
10913
Limestone Digital
@LimestoneHQ
Want your coding agents following the right rules? Book a discovery call with us:
limestonedigital.com/book-a-call?ut…
limestonedigital.com/book-a-call?ut…

limestonedigital.com
Book a Call - Limestone Digital
3:04 PM UTC · Nov 9, 2026 · 6.5K Views
00820