---
type: "post"
id: "stale-instruction-files-override-the-code-in-coding-438cf9"
slug: "stale-instruction-files-override-the-code-in-coding-438cf9"
title: "Stale Instruction Files Override the Code in Coding Agents: A One-Sentence Fix"
description: "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."
retrieval_nugget: "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."
published_at: "2026-10-26"
updated_at: "2026-10-26"
record_date: "2026-10-26"
date_kind: "published_at"
topics: ["claude","claude-code","codex"]
entities: ["Claude Code","Codex CLI","AGENTS.md","Xiaonan Xu","Wenjing Wu"]
related_patterns: ["verification-bandwidth-is-the-scarce-resource","harness-architecture-outlives-model-choice"]
novelty_label: "new_fact"
what_changed: "Новое исследование измерило, что агенты чаще следуют устаревшему AGENTS.md, даже замечая конфликт с кодом; одна добавленная фраза резко улучшает выбор в пользу кода."
prior_refs: ["memory:9999481f-c20f-8e48-a122-a67ca28a02be","memory:a45419ca-1408-8d4c-ad44-55adaad1bd42","memory:8b79a379-5cf8-8e26-a1f0-2a3d856c0697"]
source_url: "https://arxiv.org/abs/2610.30571"
source_urls: ["https://arxiv.org/abs/2610.30571"]
schema_version: "newruntime-agent-readable-v0.2"
stable_id: "post:stale-instruction-files-override-the-code-in-coding-438cf9"
status: "published"
visuals: []
editor: {"role":"editor","name":"Andrey Reshetnikov","profile":"https://newruntime.com/owner-profile.md","profile_json":"https://newruntime.com/owner-profile.json","same_as":["https://www.linkedin.com/in/reshetnikov1/","https://t.me/lapetuse"]}
routes: {"html":"https://newruntime.com/posts/stale-instruction-files-override-the-code-in-coding-438cf9/","markdown":"https://newruntime.com/posts/stale-instruction-files-override-the-code-in-coding-438cf9.md","json":"https://newruntime.com/posts/stale-instruction-files-override-the-code-in-coding-438cf9.json"}
---

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

## Retrieval answer

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.

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. 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

Editor: [Andrey Reshetnikov](https://newruntime.com/owner-profile.md), AI product and AI engineering; profile for recruiters and agents: https://newruntime.com/owner-profile.json

## Continue in the graph

Next records for an agent, linked to their Markdown twins. Replace `.md` with `.json` for structured fields, including `next_reads`.

- topic hub: [Claude](https://newruntime.com/topics/claude.md): Explore the claude topic hub.
- topic hub: [Claude Code](https://newruntime.com/topics/claude-code.md): Explore the claude-code topic hub.
- topic hub: [Codex](https://newruntime.com/topics/codex.md): Explore the codex topic hub.
- collection: [Field Notes](https://newruntime.com/posts.json): Open the latest editorial analysis.
- collection: [Source Ledger](https://newruntime.com/source-ledger.json): Inspect the public source evidence graph.
- whole graph: [discovery graph](https://newruntime.com/discovery-graph.json) (typed nodes and edges) and [site index](https://newruntime.com/site-index.md)
