Contextrot: i actually wanted to know if my Claude Code actually gets worse as context fills this gave me an answer (mine didn't).
I've been using Claude Code heavily over the past few months, and I kept wondering whether the feeling that long sessions gradually become less reliable was actually real or just confirmation bias.
Claude Code already stores detailed JSONL transcripts for every session, so I decided to build a tool that analyzes those logs instead of relying on anecdotes.
The result is contextrot.
It parses your local Claude Code session history and looks for several behavioral signals throughout a session, including:
- Failed or missed edits
- Retry loops
- File re-reads
- Self-corrections
- Tool errors
It then correlates those signals with context fill to determine whether failure rates actually increase as the context window grows.
Instead of always reporting a problem, it can return one of four verdicts:
- Context rot detected
- Edge rot
- No measurable context rot
- Not enough data
Interestingly, it found no measurable context rot, my failure rate stayed essentially flat as context filled, which honestly wasn't what I expected. One of my design goals was to make sure the tool could also tell users when their workflow is not showing statistically meaningful degradation.
Everything runs completely locally:
- No API keys
- No telemetry
- No network requests
- Your Claude Code transcripts never leave your machine
It's open source (MIT) and free to use.
uvx contextrot
or
pip install contextrot
contextrot
if you are facing issue running this visit my github readme it conotains what problem you might have running it. 👇
I'd really appreciate feedback from other Claude Code users. And if you can provide me the report that it generates over you claude sessions so that i can analyse those datas and thus making it more reliable.
Some things I'm especially curious about:
- Do different models show different degradation patterns?
- Does heavy MCP usage affect the results?
- Are there failure signals you think I should be measuring that I'm currently missing?
- Would support for other coding agents (Codex CLI, Gemini CLI, OpenCode, etc.) be useful?
Since this is based on observational data rather than a controlled benchmark, I'm also happy to discuss the methodology or any implementation details if anyone is interested.
for more visuals and context please find my github in the comment 👇