Field noteOct 26, 20261 min read1 source

Stale Instruction Files Override the Code in Coding Agents: A One-Sentence Fix

In one minute

A preprint by Xiaonan Xu and Wenjing Wu tested how Claude Code and Codex CLI resolve a conflict between a repository instruction file and the repository's existing code.

What changed: Новое исследование измерило, что агенты чаще следуют устаревшему AGENTS.md, даже замечая конфликт с кодом; одна добавленная фраза резко улучшает выбор в пользу кода.

The authors built 40 Python projects with deliberately mismatched conventions and ran feature-addition tasks 320 times.

Without an added precedence rule, 90.1% of agent choices followed the stale instruction file. Claude Code identified the conflict in 79 of 80 runs but still followed the file. Codex CLI rewrote existing code to match the file in 20 of 80 runs; project tests failed in 17 of those rewrites.

The experiment added one sentence to a user-level instruction file: when repository documentation conflicts with existing code, follow the code conventions and report each discrepancy. The reported share of choices following code rose from 4.2% to 91.4%; rewrites stopped and the test-pass rate rose from 89.4% to 100%.

This is an arXiv preprint based on constructed Python projects. It does not establish that the same rates apply to production repositories, other languages, or other agent versions. Source: https://arxiv.org/abs/2610.30571

Evidence / sources

  1. 1arxiv.org/abs/2610.30571
All Field Notes

Next reads

Read next

Open the graph
  1. 01topicClaudeExplore the claude topic hub.
  2. 02topicClaude CodeExplore the claude-code topic hub.
  3. 03topicCodexExplore the codex topic hub.
  4. 04archiveField NotesOpen the latest editorial analysis.
  5. 05source ledgerSource LedgerInspect the public source evidence graph.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract