Why Agents Ignore Your AGENTS.md
Agents skip instruction files full of rules for other tasks. Why it happens, why splitting the file only goes so far & the case for one central library of standards.
Why Do Agents Skip Your Instructions?
Your agent reads its instruction file at the start of every session. It also decides whether the file applies to the task.
A coding agent starts each session knowing nothing about your codebase, so it reads an instruction file: CLAUDE.md for Claude Code, AGENTS.md for Codex & others, .cursor/rules for Cursor. Then, some of the time, it ignores what the file says.
In Claude Code's case the reason is written down. HumanLayer put a logging proxy between Claude Code & the API in late 2025 & found the file wrapped in a system reminder:
this context may or may not be relevant to your tasks. You should not respond to this context unless it is highly relevant to your task.
Claude Code system reminder, November 2025
The agent weighs your file against the task in front of it & follows it only when it looks relevant. The wording may have changed since, & other agents wrap their files differently, but the problem in the next section applies to every agent.
Below: what makes a file easy to skip, why splitting it up only goes so far & what a better setup looks like.
Every Rule Spends the Same Budget
The more rules in your file that don't apply to the current task, the easier the whole file is to skip.
Instruction files grow one fix at a time. The agent does something you don't like, so you add a line. A few months later the file covers database schemas, release steps & edge cases nobody remembers the reason for.
A rule about database schemas does nothing for a UI change except take up room, & room is limited. The same write-up points to research suggesting frontier thinking models follow roughly 150 to 200 instructions with reasonable consistency. By their count, Claude Code's own system prompt uses about 50 of those before your file loads.
As the count rises, the agent doesn't drop the rules at the bottom first. It follows every instruction a little less, including the ones you care about most.
A Hacker News commenter shared a faster way to notice. His friend tells Claude, in the instruction file, to always address him as “Mr Tinkleberry.” When the agent stops using the name, he knows it has stopped following the file. (Pick your own title.)
If a rule doesn't apply to most tasks, it doesn't belong in the file every task loads.
Why Splitting the File Only Goes So Far
A short root file that points to task-specific files is a real improvement. It still lives in every repo.
The usual fix is to keep the root file short, move guidance into separate files (testing, database, API conventions) & let the agent open the ones that fit the task. I'd take that over one long file every time.
Two problems are left. Each agent reads its own file, so a team on Claude Code, Cursor & Copilot keeps the same standards in CLAUDE.md, .cursor/rules & copilot-instructions.md, in every repo. Every edit has to land in all of those copies, & some get missed.
The agent also still picks which files to open, based on a one-line description someone wrote months ago.
One Library, Served by Task
Teams need one central source of standards that hands each agent only the rules for the task in front of it.
Write each standard once, in one place, & scope it to an agent, a repo or everything. When an agent starts a task, it describes the task & gets back the standards that match, over MCP or whatever your agents share. A UI change gets the UI rules. A migration gets the database rules.
The agent's context stays small because it only holds rules that apply. A changed rule reaches every agent on its next task, with nothing to copy & no pull requests across repos.
It isn't free. The lookup is one more service your agents depend on, & someone has to own the library. I think that trade is worth it as soon as you run more than one agent or more than a couple of repos.
If you aren't ready to change your setup, start with the file you have. Go through it line by line & ask whether each rule applies to most tasks. Move the ones that don't somewhere the agent reads only when it needs them.
Your agent might even go back to calling you Mr Tinkleberry.
Resources
The write-up & the discussion this piece draws on.
- Writing a Good CLAUDE.md: what goes in the file, the system reminder & the instruction count research
- Hacker News discussion: the thread on that write-up, including the Mr Tinkleberry check