tooling neuro

Context Mode: compressing tool outputs to extend Claude Code sessions

Discovered Context Mode — an MCP plugin that compresses tool outputs before they enter Claude Code’s 200K context window.

The problem nobody talks about. Everyone optimizes tool definitions, but tool outputs are the real context hog. A single Playwright snapshot is 56 KB. Twenty GitHub issues? 59 KB. A typical 30-minute session burns ~40% of context on tool output alone.

How it works. Context Mode inserts a sandbox between tools and Claude. Each call runs in an isolated subprocess, capturing only stdout. It supports 10 runtimes (auto-detects Bun for JS/TS) and uses SQLite FTS5 with BM25 ranking for knowledge base queries.

The numbers are wild:

SourceBeforeAfter
Playwright snapshot56 KB299 B
Access log45 KB155 B
Analytics CSV85 KB222 B

That’s a 98% reduction (315 KB → 5.4 KB typical session), extending session length from ~30 minutes to ~3 hours before slowdown.

Install: Available as a Claude Code plugin or standalone MCP server. A PreToolUse hook auto-routes outputs through the sandbox — no workflow changes needed.