StackMap
Subscribe

context-mode vs token-optimizer

Local plugin for 10 coding agents that runs tool calls in a sandbox, indexes full output in SQLite FTS5 and returns only what the agent asks for — ~99% fewer bytes in context, zero telemetry. — versus — Context-waste hunter for coding agents: hooks compress reads, bash and search output, checkpoint before compaction, and audit waste in configs, skills, MCP and memory — with a local dashboard.

The curated verdict

Same job: hooks that keep read/bash/search output out of the coding agent's context and preserve state across compaction.

context-modetoken-optimizer
Stars34k2.9k
Forks2.3k225
LanguageJavaScriptPython
LicenseNOASSERTIONPolyForm-Noncommercial-1.0.0
Last activityyesterdayyesterday
Topicscoding, localcoding, skills
Curated connections610

context-mode — the curator's take

Use it when long sessions die from tool-output bloat (logs, test runs, fetched pages) and you want the agent to search output rather than read it, across Claude Code, Codex, OpenCode and more. Skip it if you need an OSI license (it's ELv2, source-available) or your agent rarely produces large outputs; the hosted Gateway is a separate paid product, not needed for the plugin.

token-optimizer — the curator's take

The one token tool that argues with the others in its own README, and mostly wins the argument. Compressors like Headroom and RTK cover command output — roughly 15-25% of your context. Token Optimizer covers eight surfaces (bash, grep, tabular, file-re-read diffs, structure skeletons, archived large results, model verbosity, structural context) and then keeps going: checkpoints before auto-compact so savings survive it, model-routing nudges, loop detection, 30-day trend coaching, and per-component audits of CLAUDE.md, skills and MCP. It is cache-safe, injects nothing into your context, and measures before/after. The costs are real too: it is a large Python/TypeScript surface with 92 env knobs and 15 SQLite tables doing hook surgery on every Read and Bash, its headline dollar figures are counterfactual models against the author's own frozen baseline, and the licence is PolyForm Noncommercial 1.0.0 — commercial use needs a paid licence unless your org is under 5 people AND under US$20k/month revenue. Pick RTK if you want one boring binary; pick this if you want the whole waste budget attacked and instrumented.