context-mode sandboxes AI coding agent tool output, cutting context size by ~98%
lxfater · x · 2026-10-04
The problem
AI coding agents get dumber in long conversations largely because raw tool output from test runs and log lookups floods the context window, forcing frequent compression that loses earlier requirements.
How context-mode works
The open-source project keeps raw output in a sandbox, lets the agent filter and aggregate it, and only brings relevant results back into the conversation. In the project's example, 315 KB of raw output shrinks to 5.4 KB entering the context — a 98% reduction in tool output size (not total token or cost savings).
It also persists file changes, tasks, and user decisions for retrieval after context compression, helping long tasks continue smoothly. Routing across 17 platforms is enforced via MCP + hooks. The repo has 25.3k stars and is worth a look for anyone running long agent tasks.
More from coding & agent
- Claude Opus Configures Karabiner Media Keys End-to-End, No Human Hands — cantrell · 2026-11-29
- Agentic GraphRAG unifies enterprise knowledge and agent memory in one traversable graph — vm324234 · 2026-11-29
- Coding agent blocked from npm rewrote the whole package from memory — and it worked — Panther1537 · 2026-11-29
- AI agents solve 909 open math problems in 2 days on 18-year-old's Left to Solve site — julianibarz · 2026-11-29
- 'Verification is AI's next trillion-dollar category' — proof checkers, evals, agents auditing agents — McDonaghMatthew · 2026-11-29
- Vibe-codevember day 28: 'Hive', a Three.js creative coding demo built with AI — thespite · 2026-11-29