Governor, a new open-source plugin for Claude Code, takes aim at a problem heavy users know all too well: context window bloat killing coding sessions. Developer 0xhimanshu built Governor to tackle the real session killers like bloated CLAUDE.md files, noisy test output flooding your context, and scope drift during long tasks. It compresses memory files, filters tool output, adds planning guardrails, and tracks token usage through local telemetry. You can install it with a single bash command. The plugin is MIT-licensed and available on GitHub.
The numbers from local benchmarks look solid. Governor cut output tokens by 55.5% compared to running without it, compressed project notes by 55.4%, and blocked 96.8% of noisy pytest output tokens while still preserving failure signals. That last bit matters. A lot of token-reduction tools just slash everything. Governor uses what it calls protected-span safety to keep code blocks, URLs, commands, and paths intact during compression. It also has a quality guard that rejects low-savings compression and restores the backup rather than pretending it worked.
The plugin integrates directly into Claude Code through a /governor:* command namespace, giving you commands for status checks, context auditing, memory compression, and plan management. Governor also exports compact-mode rules for other AI coding agents including Cursor, Windsurf, Cline, Gemini CLI, and Codex, though the full hook and telemetry features only work with Claude Code. Discussion on Hacker News raised valid concerns about whether aggressive compression might hurt the model's effectiveness. It's a fair question. Saving tokens only helps if you're not losing critical context in the process.