Skip to content

Data: CLAUDE.md instructions lose effectiveness as context grows #6

@nicolalessi

Description

@nicolalessi

I've been tracking how CLAUDE.md instruction compliance changes as context size grows during Claude Code sessions.

On a ~800 file project, Claude Code averages 23 tool calls per prompt (Read/Grep/Glob), pulling ~180K tokens into context. At that volume, CLAUDE.md instructions start losing statistical weight. The model doesn't "decide" to ignore them, they just get diluted in a massive context window.

I measured this directly: instruction compliance dropped noticeably after ~40K tokens of codebase context was loaded alongside the CLAUDE.md.

Reducing what goes into the context window before the agent reads CLAUDE.md significantly improves compliance. On my tests, pre-filtering codebase context to only relevant files improved both instruction adherence and output quality.

Has anyone using this memory bank system noticed similar degradation on larger projects? Curious if the memory bank approach partially addresses this or if it's orthogonal.

Data: vexp.dev/benchmark

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions