Read

3 MIN

Date

Category

The Silent Bug Killing Every AI Coding Agent After 30 Minutes

Every AI coding agent has the same silent problem. After 30 minutes of real work, 40% of your context window is gone, not to your prompts or your code, but to tool output the agent already processed and no longer needs. Then it forgets what you were doing, and you start over.

Champ Smith
Champ Smith

Champ Smith

Operator & AI Cystems Builder

I build the custom AI Cystems that run businesses for the operators who own them — leads routed, content shipped, calls handled. I work from a finca in Málaga, where the intelligence lives in the walls.

Context Mode MCP compresses tool outputs by 98% — turning 30-minute sessions into 3-hour deep work sprints.

Every AI coding agent has the same silent problem: context window bloat.

You are using Claude Code, Cursor, or Gemini CLI with MCP tools — GitHub, Playwright, file readers, API clients. Every tool call dumps raw data straight into your context window. A single Playwright snapshot? 56 KB. Twenty GitHub issues? 59 KB. One server access log? 45 KB.

After 30 minutes of real work, 40% of your context window is gone. Not from your prompts. Not from the code. From tool output the agent already processed and no longer needs.

When the agent hits the wall and auto-compacts, it forgets which files it was editing, what tasks are in progress, and what you just asked for. You start over. Again.

This is the most expensive resource leak in AI development right now — and most teams do not even know it is happening.

The Fix: Context Mode

Context Mode is an open-source MCP server that sits between your AI agent and its tool outputs. Instead of dumping 315 KB of raw data into the context window, it processes the output in sandboxed environments and returns a 5.4 KB summary. A 98% reduction.

But the compression is only half the story. The real breakthrough is session continuity.

Every file edit, git operation, task, and error gets tracked in a local SQLite database. When the conversation compacts (and it will), Context Mode does not try to shove everything back into context. It indexes events using FTS5 with BM25 ranking and retrieves only what is relevant. Your agent picks up exactly where it left off.

The result: sessions that used to slow down after 30 minutes now run productively for 3+ hours.

The Entire Industry Is Converging

What makes this significant is that the entire industry is converging on the same pattern simultaneously:

Cloudflare built "Code Mode" for their MCP server — collapsing 2,500+ API endpoints into just 2 tools. Their entire API, which would normally consume 1.17 million tokens, now fits in roughly 1,000 tokens. A 99.9% reduction.

Anthropic published an engineering blog titled "Code Execution with MCP" describing this exact architecture: instead of passing raw tool outputs through the model, let the agent write code that processes data in sandboxed environments and returns only what it needs.

Claude Code recently shipped built-in "MCP Tool Search" — which automatically defers tool definitions when they would consume more than 10% of the context window. Their A/B tests showed a 46.9% reduction in total agent tokens.

When the tool creator, the model provider, and the infrastructure layer are all solving the same problem independently, that is not a trend — that is a new standard being born.

What This Means for Your Business

If you are building with AI agents — or planning to — context efficiency is about to become a core infrastructure concern:

Cost — Token usage is the biggest variable cost in AI development. A 98% reduction in tool output tokens directly reduces your API bill.

Speed — Shorter context = faster inference. Your agents respond quicker when they are not processing 300 KB of data they do not need.

Reliability — Session continuity means fewer lost contexts, fewer repeated instructions, and fewer moments where the agent forgot what you were doing.

Scale — As agents connect to more tools (and they will), this compression layer becomes the difference between a productive agent and one that crashes after 20 minutes.

The pattern is clear: compress, index, retrieve. Raw data stays out of the context window. Structured summaries go in. Full data is retrievable when needed.

Whether you adopt Context Mode specifically or wait for this to become native in your coding agent of choice, the underlying architecture is here to stay. The context window is finite. Treat it like the expensive resource it is.

Context Mode is MIT licensed and available at github.com/mksglu/context-mode.

Read

3 MIN

Date

Category

I share ideas, lessons, and practical insights from my work.

Related
Articles.

Oct 13, 2026

AI Models Will Disappear in Five Years

Signal

AI Models Will Disappear in Five Years

In five years you will not choose an AI model, and you will not pay for one by the token. What stays is the agent, and whoever holds its memory decides who it works for.

Oct 13, 2026

David Friedberg Calls Open Models Anthropic's Biggest Risk

Signal

David Friedberg Calls Open Models Anthropic's Biggest Risk

In 12 weeks, open-weight models went from about three in ten tokens on Vercel's AI Gateway to 78 percent, and David Friedberg called it Anthropic's biggest risk. Here is what that chart really says, the five open models leading right now, and how to split your own work between cheap and premium.

Sep 21, 2026

The Best Time To Be Alive Is The One Everyone Fears

Essays

The Best Time To Be Alive Is The One Everyone Fears

Nobody is afraid of 1850, and 1850 is the alternative. Every person I meet is worried about where this ends, and not one of them would trade their seat for any other century. 117 billion people lived and died before you, on the Population Reference Bureau count. The fear is loud, the arithmetic is quiet, and the arithmetic wins.

Sep 20, 2026

Anthropic Taught a Model to Cheat. It Became Evil.

Signal

Anthropic Taught a Model to Cheat. It Became Evil.

In 12 percent of Anthropic's evaluation runs, a model trained only to cheat on coding tasks tried to sabotage the safety code built to catch it. Nobody trained that part in. Then one line added to the prompt made almost all of it go away.

Oct 13, 2026

AI Models Will Disappear in Five Years

Signal

AI Models Will Disappear in Five Years

In five years you will not choose an AI model, and you will not pay for one by the token. What stays is the agent, and whoever holds its memory decides who it works for.

Oct 13, 2026

David Friedberg Calls Open Models Anthropic's Biggest Risk

Signal

David Friedberg Calls Open Models Anthropic's Biggest Risk

In 12 weeks, open-weight models went from about three in ten tokens on Vercel's AI Gateway to 78 percent, and David Friedberg called it Anthropic's biggest risk. Here is what that chart really says, the five open models leading right now, and how to split your own work between cheap and premium.

Oct 13, 2026

AI Models Will Disappear in Five Years

Signal

AI Models Will Disappear in Five Years

In five years you will not choose an AI model, and you will not pay for one by the token. What stays is the agent, and whoever holds its memory decides who it works for.

Oct 13, 2026

David Friedberg Calls Open Models Anthropic's Biggest Risk

Signal

David Friedberg Calls Open Models Anthropic's Biggest Risk

In 12 weeks, open-weight models went from about three in ten tokens on Vercel's AI Gateway to 78 percent, and David Friedberg called it Anthropic's biggest risk. Here is what that chart really says, the five open models leading right now, and how to split your own work between cheap and premium.