StackMap
Subscribe

fast-jev-compaction vs headroom

Claude Code plugin and npm library that replaces compaction summaries with Jev decisions: every tool call and result is scored, stale ones dropped or truncated, everything kept stays verbatim. — 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

Same goal, opposite method: headroom squeezes tool output, logs and chunks 20-95% before the model sees them, this drops entire calls and keeps survivors byte-for-byte - lossy-but-smaller versus exact-but-fewer.

fast-jev-compactionheadroom
Stars4.2k73k
Forks2215.6k
LanguageTypeScriptPython
LicenseMITApache-2.0
Last activityyesterdaytoday
Topicscoding, agentscoding, gateway
Curated connections58

fast-jev-compaction — the curator's take

The sharpest idea in agent context management right now: never rewrite, only delete. A summary can silently lose the exact error, path or constraint you need twenty turns later; this scores each tool call and result with two noul questions against the whole conversation and then removes rather than paraphrases, so user and assistant text survives byte-for-byte. Fitting the state into 25k tokens is staged and documented, and it throws instead of guessing when history won't fit. Use it when losing a literal detail is the failure you fear. Don't use it if your bloat is prose rather than tool output - text is never shortened in the output - and note the honest limitation in its own README: a keep probability is not a proof that a result is safe to delete. Needs a hosted TypeSafe key on every compaction.

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.