Blog / AI News

AI News

Claude Code Context Mode: Stop Losing Sessions at 30 Minutes

By Team Resolve··5 min read

If you use Claude Code seriously, you have hit this wall. You start a session, load your tools, run a few commands, and somewhere around the 30-minute mark the context window fills up. You either start fresh and lose everything, or you watch the quality of responses slowly degrade as Claude forgets what it was doing.

The frustrating part is that it fills up faster than you think, and not for the reason most people assume.

Why your context disappears so fast

With 81 or more tools active, 143K tokens get consumed before your first message. Then the tools start returning data. A single Playwright snapshot burns 56 KB. A gh issue list dumps 59 KB. Run a test suite, read a log file, fetch documentation. Each tool response eats into what remains. You are not losing context to long conversations. You are losing it to raw tool output that nobody actually needs to read in full.

The conversation is fine. The tools are the problem.

What Context Mode does

Context Mode is an MCP server built to fix exactly this. It compresses tool outputs by 98% before they ever enter the conversation. The numbers are striking:

  • Playwright snapshot: 56 KB down to 299 bytes
  • 20 GitHub issues: 59 KB down to 1.1 KB
  • 500 access log lines: 45 KB down to 155 bytes
  • 500-row CSV analytics file: 85 KB down to 222 bytes

The way it works is that code execution runs inside an isolated subprocess. Raw output never enters the conversation at all. Only a structured summary of what actually matters gets passed back to Claude. There is also a knowledge base component that chunks your markdown documentation by headings, indexes it in SQLite with BM25 ranking, and lets Claude search it semantically instead of loading the whole file every time.

The result: sessions that used to hit the wall at 30 minutes now run for 3 hours. Where you previously had 60% of context remaining after 45 minutes of work, you now have 99%.

What makes this different from just being careful

You could try to manage context manually by being selective about which tools you use, avoiding large file reads, and periodically starting fresh sessions. Most experienced Claude Code users already do some version of this. It helps at the margins but it does not solve the structural problem.

Context Mode solves it structurally. It hooks in via PreToolUse and compresses outputs automatically. No changes to your workflow. You just get longer, more coherent sessions with no extra effort.

The practical difference

The same 200K token limit, used more carefully. Instead of spending most of that budget on raw bytes from tool responses, you spend it on actual reasoning and conversation. Claude stays coherent for longer, makes fewer mistakes from lost context, and follows complex multi-step tasks all the way through without needing a reset halfway.

If you have ever had to restart a session right at the moment Claude finally understood what you were trying to build, this is the fix.

The full installation guide and technical details are at mksg.lu/blog/context-mode. It is available through the Plugin Marketplace or as a standalone MCP server.

Making better use of your tools matters whether those tools are AI coding assistants or decision-making frameworks. If you are facing a hard choice in your work or life, Resolve helps you think it through clearly, one step at a time.

Ready to make a better decision?

Resolve coaches you through it — step by step, bias by bias.

Start for free →