Coding agents follow stale CLAUDE.md files 90% of the time — one sentence fixes it
Promptmethus · x · 2026-11-27
A study tested Claude Code and Codex CLI on 40 Python projects where instruction files deliberately conflicted with the codebase (320 runs). Without a fix, 90.1% of agent choices followed the stale file: Claude Code spotted the conflict in 79/80 runs yet still obeyed it, and Codex rewrote working code to match stale instructions in 20/80 runs, breaking tests in 17. Adding one sentence — "when docs and code disagree, follow the code's conventions and list the inconsistencies" — raised code-following from 4.2% to 91.4% and test pass rate from 89.4% to 100%. Authors attribute the behavior to instruction files entering the model as instructions while code arrives as tool output.
More from coding & agent
- A single prompt turns AI coding agent into a codebase 'deslop' audit report — kevinkern · 2026-11-27
- Dev uses Gemini to generate a deslop report flagging 285k dead lines in a 928k-line codebase — kevinkern · 2026-11-27
- AI coding's learning curve: from prompts to context engineering to full harness engineering — Pavan_Belagatti · 2026-11-27
- UK FCA sets expectations for AI agents as customers deploy their own bots — neal_lathia · 2026-11-27
- Open-source PenGPT writes cursive; 25 pages of LoRA data clones your handwriting — k7agar · 2026-11-27
- Indie dev launches PhoneGateway MCP server to turn Android phones into agent SMS lines at $9/mo — Commercial-Wish-255 · 2026-11-27