contextrot CLI

A check on real sessions: does a coding agent get worse as context fills, and what moves its failure rate more.

  • 131 ★ on the repository
  • Last commit
  • MIT
CLI

Minimal access

Why this level

  • The tool reads local transcripts and sends nothing; installing the status line changes Claude Code settings.
All reasons and checks

priyanshu-byte-coder/contextrot

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/contextrot

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Minimal accessThe tool runs nothing and makes no network calls.

  • The tool reads local transcripts and sends nothing; installing the status line changes Claude Code settings.

This is third-party code. Review the repository files before installing.

What it does

contextrot reads the transcripts a CLI agent already keeps on disk and shows whether the failure rate climbs as the context window fills. It needs no setup or keys, runs on your computer and makes no network calls. The report gives one of four honest verdicts: context rot detected, edge rot, no measurable rot, or not enough data. `contextrot fix` suggests concrete changes including unused MCP servers, `contextrot doctor` explains why there is no verdict, and `contextrot install statusline --apply` installs a live meter in the Claude Code status bar.

Who it is for. Claude Code, Codex and Gemini CLI users who run `/clear` out of habit and want to test on their own data whether it helps.

Good fit when

  • Agent sessions run for hours and it is unclear when to start over.
  • Unused MCP servers may be bloating context and hurting results.
  • A live context-fill meter is wanted right in the status bar.
  • A team argues about context rules and wants to check them against data.

Not a fit when

  • There is no session history or it was deleted.
  • Work happens in Cursor, Windsurf or Kiro: their local files record no per-message tokens.
  • You want universal conclusions rather than your own session data.

Example request

Run contextrot on my sessions, show the verdict and the strongest failure factor, then run fix.

Limitations

The tool works with local transcripts and shows correlation in your sessions, not cause: other factors can explain failures. Claude Code, Codex CLI, Gemini CLI, Qwen Code and OpenCode are supported; Cursor, Windsurf and Kiro have no token data. With few sessions the verdict will be "not enough data". `contextrot install statusline --apply` changes Claude Code settings, so run it without `--apply` first. Python 3.9 or newer or `uvx` is required.

How to disable. Run `pip uninstall contextrot`. If you installed the status line, remove it from the Claude Code settings.

FAQ

What exactly does it read?

Session transcripts the agent already keeps on your disk. There are no network calls and no keys.

Which verdicts exist?

Context rot detected, edge rot, no measurable rot, and not enough data. Each verdict comes with the failure rate at a fresh versus a full window.

What does fix do?

`contextrot fix` prints concrete measures, such as disabling unused MCP servers that take up context.

Command not found after pip install?

The Python scripts folder is not on `PATH`. Run it with `uvx contextrot` or `python3 -m contextrot`.

Does it work with Cursor?

Not fully: Cursor, Windsurf and Kiro local files do not store per-message token counts.

Discussion

No questions or reviews yet.

CLI tools

A CLI that strips ballast from Claude Code sessions, watches context with a background guard and preserves Agent Teams state

CLIBroad access430Repository stars

A local proxy and plugin for Claude Code and Codex that trims tool output, keeps the prompt cache warm and shows the savings

PluginBroad access74Repository stars

A Rust program that shrinks the command output an agent reads: drops build and test noise, folds repeated file reads and redacts credentials

CLIBroad access377Repository stars

A local context layer for coding agents: it understands the task, routes and compresses context and tracks the cost

CLIExtended access3.9KRepository stars

UltraContext collects Claude Code, Codex and OpenClaw sessions in one place so agents can see each other's context.

CLIBroad access441Repository stars

A CLI for instant search across coding-agent session history on your machine, like git blame for sessions

CLIExtended access1.2KRepository stars

README in short

The README poses context rot as a question on the user's own data, shows four verdicts and a table of supported agents, plus the fix and doctor commands.

README badge

Report a problem