Governor – a Claude Code plugin to reduce token/context waste

· coding ai devtools · Source ↗

TLDR

  • Claude Code plugin that attacks session token waste via output compression, CLAUDE.md slimming, tool-output filtering, telemetry, and scope-drift guardrails.

Key Takeaways

  • Benchmarks show Governor cuts output tokens 55.5% vs control (vs 44.9% for Caveman) on three technical prompts with Sonnet, no tools.
  • Tool-output filtering reduces noisy pytest -vv output from ~54,314 estimated tokens to ~1,726, a 96.8% reduction while preserving failure lines.
  • /governor:compress rewrites CLAUDE.md into dense prose with protected-span validation; low-savings results are rejected and backups restored automatically.
  • Telemetry ledger at ~/.claude/plugins/governor/ tracks blocked tokens, failed tool calls, compactions, and memory compression savings in JSONL.
  • Portable rule snippets extend compact-mode behavior to Codex, Gemini CLI, Cursor, Windsurf, and Cline via agent-specific rule files.

Hacker News Comment Review

  • The single substantive comment challenges the project’s framing: token savings are table stakes; the real unknown is whether compression degrades the model’s effective reasoning quality.
  • No evidence or benchmarks on intelligence regression are provided in the source, which is a gap given the aggressive filtering and rewriting involved.

Notable Comments

  • @esafak: “we need to get past touting token savings. You can save more if you just throw everything away!”

Original | Discuss on HN