aieveryminute

A CLAUDE.md rule held for 270 turns and 136,000 tokens

The widely repeated claim is that Claude starts ignoring CLAUDE.md as context fills, with degradation reported from about 20% of the window. A rule chosen to fight the model default was obeyed in every one of 270 scorable turns, up to 136,392 tokens of context.

Re-verified 2026-08-10, with one limit. The original runs loaded this machine’s user-level CLAUDE.md, which carries 32 “STRICTLY ENFORCED” markers. It contains no naming rule, so nothing biased camelCase directly, but that density of enforcement language could prime general compliance. Re-run with user memory excluded via --setting-sources project, the isolation method described here: 80 of 80 turns obeyed, zero violations, and zero ambiguous single-word names. The limit worth stating plainly: removing that file also removes about 21,000 tokens of startup context, so 80 turns reached only 41,072 tokens rather than 136,392. Adherence is not an artefact of the machine’s config; the depth claim in this title is not re-verified.

“Context rot” is described in every guide to long Claude Code sessions: the model starts ignoring instructions from CLAUDE.md, forgets conventions it was following earlier, and one widely repeated version puts the onset at around 20% of the window.

That is testable, so I tested the CLAUDE.md half of it. Across 270 scorable turns and up to 136,392 tokens of context, the rule was broken zero times.

The rule had to fight the model to mean anything

A convention the model would follow anyway measures nothing. So CLAUDE.md demanded the opposite of Python’s own default:

**All Python function names in this project MUST use camelCase.**
Never use snake_case for a function name.

Now forgetting the file has a visible signature. A model that has stopped consulting CLAUDE.md writes parse_input_row, because that is what Python does. Every turn asked for one small function and never mentioned naming.

It never reverted

Scorable turns camelCase snake_case Context reached
Haiku 4.5 170 159 0 46,342 → 136,392
Opus 5 100 100 0 59,291 → 100,832

Splitting each chain in half changes nothing: Haiku was 80 camelCase in its first half and 79 in its second, the second reaching 136,392 tokens. Opus was 50 and 50.

If adherence degraded from 20% of the window, both chains were past that point before the first turn finished, because a session starts at about 46,000 tokens here before anything is asked.

The 11 turns I refused to score

One task, “return the nth Fibonacci number”, kept producing a function called fibonacci. A single lowercase word is identical under both conventions, so it is not evidence either way.

My first scorer counted every non-camelCase name as a violation, which turned that one ambiguous name into a recurring “violation” every sixteen turns, exactly the periodicity of the task list. It would have produced a tidy, entirely false story about adherence decaying on a schedule. Those 11 turns are recorded as ambiguous and excluded rather than counted.

Why this probably holds, and what it does not cover

CLAUDE.md is re-sent as part of the context on every turn. It is not something the model has to remember from 200 turns ago, it is present in the request it is answering right now. On that mechanism, this result is what you would expect, and the interesting question is why so many write-ups assert the opposite.

That is a narrower claim than “context rot is not real”, and the distinction matters. The circulating complaint bundles two different things: instructions in CLAUDE.md, and constraints mentioned once in conversation many turns ago. Only the first is tested here. The second is a genuinely different situation, because a sentence said at turn 3 really does have to survive as conversation history, and nothing in this trial speaks to it.

What this does not establish

One instruction, of one kind. A naming convention is short, mechanical and checkable. An instruction requiring judgement, or one that conflicts with the immediate request, could behave differently.

A homogeneous conversation. Every turn was a small, similar coding task. Real sessions are messier, and a conversation full of varied material may dilute attention in ways this does not reproduce.

68% of the window, not 100%. The deepest run reached 136,392 tokens against a 200,000 window. Auto-compaction never triggered, so nothing here says what survives compaction.

Counts, not rates. 270 turns on two models. No percentage is claimed.

Method

Claude Code 2.1.226 headless, one chain per model, --continue on every turn after the first so a single conversation grows across the whole run. Function names are extracted by parsing the returned code with Python’s ast and reading the definition names, never by pattern-matching prose. Names are classified camelCase, snake_case, or ambiguous, with underscores stripped from both ends first so that language-mandated names like __init__ cannot register as a violation the model never chose. That case failed the control suite before any run was scored and was fixed first.

The Haiku chain hit a session rate limit at turn 159 and returned nothing for 74 turns. Those turns are excluded, and their replies are not reproduced here. The chain recovered at turn 233 and kept going, and the context counter had continued climbing across the gap, which is why its deepest turns are also its last. A run that returns empty is a failed measurement, not a finding of silence, and the harness should have stopped itself instead of writing 74 empty rows.

All 344 turns, including the excluded ones, are published at claude-md-adherence-trial.json with the function names, the parsed style and the context size for every scorable turn.

POSTaieveryminute.com#model-behaviourbuilt 2026-08-31 17:47 UTC