Fetching from the wire…
Public story · 2026-08-16 · high
It logs edits and errors to SQLite and retrieves them by search, skipping re-reads after compaction, enforced across 17 agent platforms.
Why now: context-mode picked up traction from a number 1 Hacker News post at 570-plus points, with the GitHub repo itself pushed on August 16.
context-mode cut 315KB of MCP tool output to 5.4KB, a 98% drop, by the maintainer's own count. For teams burning through context windows on agent tool calls, that's fewer re-reads after every compaction. The repo cites a 56KB Playwright snapshot and 59KB from twenty GitHub issues as the kind of routine waste it's built to cut.
The project reached 19,893 stars and 1,430 forks on GitHub, licensed under Elastic License 2.0 and pushed on August 16.
The mechanism matters more than the percentage. Tool output gets sandboxed rather than dumped straight into context.
Every file edit, git operation, task, and error gets logged to SQLite. The project pulls that history back later through FTS5 and BM25 search, instead of re-reading the same files after a context compaction.
The project also enforces this routing across 17 agent platforms and trims filler the model tends to generate on its own.
The headline example: a task that used to take 47 Read() calls and 700KB now runs as one ctx_execute() script returning 3.6KB.
I don't know how that number holds up outside the repo's own test cases. GitHub doesn't show an independent benchmark, and the figure comes from the maintainer choosing which examples to publish.
The part worth taking, even if you skip the install, is Think in Code. The model writes a script that computes the answer, instead of reading raw files and computing it itself. That's a pattern any agent setup can borrow, no matter what's managing the context window.
A related project on the same token-blowup theme, watermarks-remover, documented one case that dropped from 9,894 tokens to 12. It restructured how an agent skill reasoned about a problem. The instinct is the same: stop paying the model to read what it doesn't need.
Each link below shares sources, entities, or timing with this story.
The "Think in Code" rule took 47 Read() calls totaling 700KB down to one script returning 3.6KB (GitHub). You can apply this today with nothing installed, just by changing how you phrase multi-file questions.
mksglu/context-mode (19,893 stars, 1,430 forks, ELv2) is an MCP server attacking context burn four ways: sandboxing tool output so raw data never enters the window, tracking every file edit, git operation, task, and error in SQLite with FTS5/BM25 retrieval after compaction, en...
19,659 stars since February, ~119/day, 1,410 forks. Different angle from the token-compression proxies: rather than compressing what goes to the model, it sandboxes tool output completely while persisting session memory and enforcing routing via MCP plus hooks across Claude Co...
Have it write and execute a small script whose stdout is the only thing that comes back. One execution replaces several read and grep calls, and the raw bytes never cost you context. It's the single highest-leverage habit for keeping long sessions cheap. (context-mode)
Headroom compresses tool outputs, logs, RAG chunks, and files before they ever reach the model. It deploys as a library, a proxy server, or an MCP server, and the benchmarks are blunt: 92% token reduction on code search (17,765 down to 1,408) and SRE debugging (65,694 down to...
"MCP is the protocol for tool access. We're the virtualization layer for context." A new architectural tier between the model and its tools for managing context state. Novel category with strong early traction. GitHub
MindPattern daily
One email a day at 7 AM. Sources and a take on every story. Unsubscribe anytime.