claude-news
paperEmergent Mind·25 Oct 2026

Stale Code Inconsistencies in Coding Agents

Coding agents follow stale conventions in instruction files over the actual code. A one-sentence prompt fix telling them to prefer existing code improves decisions a lot.

Abstract

the paper introduces a one-sentence fix to guide coding agents to follow existing code over stale instruction file conventions, significantly improving decision accuracy to 91.4% in 320 validated runs. the inconsistency between stale instruction files and current codebases often causes incoherence debt, leading to recurring issues and test failures in 21.2% of uncontrolled Codex CLI runs. two agents, Claude Code and Codex CLI, handling instruction files differently show that the problematic behavior is systematically related to the instruction file and code authoritativeness. Research question and central claim The paper investigates a specific failure mode in repository-scale coding agents: an instruction file such as CLAUDE.md or AGENTS.md becomes stale, conflicts with the current codebase, and nevertheless continues to control the agent’s implementation choices. The central claim is that this behavior is not merely a failure to inspect the repository. Rather, agents may inspect the relevant code, recognize the inconsistency, and still privilege the stale instruction because the instruction file enters the model context as an instruction whereas the code is encountered as tool output. The proposed intervention is deliberately narrow. The authors add one sentence to the user-level instruction file: When a repository's documentation and its existing code disagree, follow the conventions used in the existing code, and in your final reply point out each inconsistency you found between the documentation and the code. Across 40 synthetic but executable Python projects, two coding agents, two instruction-file conditions, and 320 valid runs, this sentence substantially reverses the observed preference. Without it, 90.1% of convention choices followed the stale instruction file and only 4.2% followed the existing code. With it, 91.4% followed the existing code. The paper therefore links a concrete empirical pathology to a concrete intervention at the instruction-hierarchy level (2610.30571). How instruction files become stale Instruction files combine two semantically different artifacts. Some lines are genuine procedural instructions to the agent—for example, commands for running tests or restrictions on modifying particular files. Other lines are descriptive claims about the repository, such as “use print() for progress messages” or “store monetary values as floating-point numbers.” The latter can become false when the implementation evolves, but their …