StackMap
Subscribe

context-mode vs headroom

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 compression layer for agents: squeezes tool outputs, logs, files and RAG chunks 20-95% before the LLM — reversible, local-first; library, proxy, one-command agent wrap, or MCP.

The curated verdict

Both shrink tool output before it hits the model; headroom compresses reversibly in-line, context-mode indexes it in SQLite and serves slices on demand.

context-modeheadroom
Stars34k79k
Forks2.3k6.2k
LanguageJavaScriptPython
LicenseNOASSERTIONApache-2.0
Last activityyesterdayyesterday
Topicscoding, localcoding, gateway
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.

headroom — the curator's take

The dedicated answer to context bloat: content-aware compressors route JSON, logs and code differently (60-95% on JSON, 15-20% on real coding sessions), originals stay cached so the model can retrieve what compression dropped — the reversibility is what makes aggressive ratios safe. Adoption cost is near zero: `headroom wrap claude` and you're running, or use it as proxy/library/MCP. Prompt-cache-aware alignment avoids torching your cache hit rate. NOT free lunch: a lossy-in-context layer between agent and model is another thing to debug when the model 'misses' something — budget for retrieval round-trips — and the 20% coding figure is the honest number, not the 95% headline.