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.

Jun 29, 2026

Essays

How You Raise a Mind

Everyone names benevolence as the only real safeguard for AI, then admits nobody is building it. So let's build it. The moment you try, it stops being philosophy and becomes architecture, because you cannot legislate character into a mind. The question was never how to cage it, but how to raise it.

Jun 26, 2026

Essays

A Different Narrative

The most credible pessimist in finance calls AI the biggest investment bubble in history, and relaying the godfather of AI, he lands on a single word as the only way through: benevolence. Everyone names the answer. Almost no one is building it. That's the conversation I want to have.

Jun 24, 2026

Signal

The Machines Started Paying Each Other

For the entire history of the internet, there was a human at the end of every transaction. Someone clicked buy. That assumption is quietly breaking: machines have started paying each other, in stablecoins, with no checkout page. The question every business now has to answer is whether an agent can find you, and pay you.

Jun 23, 2026

Signal

Japan Didn't Build a Frontier Model. It Built a Conductor — And That's the Bigger Story.

The headlines said Japan built a frontier model to rival Anthropic's best. It didn't. Sakana built a conductor, a small model that reads your task, routes it to the strongest existing models, and verifies the result. There are two ways to win with AI, and Fugu just proved the cheaper one works.

Jun 29, 2026

Essays

How You Raise a Mind

Everyone names benevolence as the only real safeguard for AI, then admits nobody is building it. So let's build it. The moment you try, it stops being philosophy and becomes architecture, because you cannot legislate character into a mind. The question was never how to cage it, but how to raise it.

Jun 26, 2026

Essays

A Different Narrative

The most credible pessimist in finance calls AI the biggest investment bubble in history, and relaying the godfather of AI, he lands on a single word as the only way through: benevolence. Everyone names the answer. Almost no one is building it. That's the conversation I want to have.

Jun 29, 2026

Essays

How You Raise a Mind

Everyone names benevolence as the only real safeguard for AI, then admits nobody is building it. So let's build it. The moment you try, it stops being philosophy and becomes architecture, because you cannot legislate character into a mind. The question was never how to cage it, but how to raise it.

Jun 26, 2026

Essays

A Different Narrative

The most credible pessimist in finance calls AI the biggest investment bubble in history, and relaying the godfather of AI, he lands on a single word as the only way through: benevolence. Everyone names the answer. Almost no one is building it. That's the conversation I want to have.