Stale Instruction Files Override the Code in Coding Agents: A One-Sentence Fix
Your project instruction file drifts — it still says use print() for progress messages while the code moved to a logger a year ago. Across 40 Python projects built so the file and the code disagree on four or five choices, and 320 unattended feature runs by two mainstream coding agents, 90.1% of those choices followed the stale file and 4.2% followed the code. Noticing does not help: one agent named the conflict in 79 of 80 runs and still went with the file in 86.2% of its choices, while the other silently rewrote working code in 20 of 80 runs, deleting a median of 198 lines and breaking the project's original tests in 17 of them. The authors read this as a precedence problem — the file reaches the model as an instruction and the code only as tool output, which models are trained to trust less — so one sentence telling the agent to follow the code and report the inconsistency moved code-following to 91.4% and the test pass rate from 89.4% to 100%.