---
title: "context-mode Cuts AI Coding Session Token Waste by 98% for 300K Developers"
subtitle: "context-mode is a free MCP plugin that intercepts tool output before it hits your context window, cutting token usage by 98% and surviving session compaction across 17 AI coding platforms."
url: "https://alphasignal.ai/news/context-mode-cuts-ai-coding-session-token-waste-by-98-for-300k-developers"
author: "AlphaSignal Newsroom"
author_url: "https://alphasignal.ai/editorial-team"
company: "AlphaSignal"
company_url: "https://alphasignal.ai/company/alphasignal"
published: "2026-06-24T12:40:34.000Z"
updated: "2026-06-24T13:11:43.156Z"
type: "Repo"
topics:
  - "Development"
  - "Infra"
subtopics:
  - "Code Agents"
  - "Inference Optimization"
  - "Model Serving"
upvotes: 12
source_url: "https://github.com/mksglu/context-mode"
comments: 0
truncated: true
---

# context-mode Cuts AI Coding Session Token Waste by 98% for 300K Developers

> context-mode is a free MCP plugin that intercepts tool output before it hits your context window, cutting token usage by 98% and surviving session compaction across 17 AI coding platforms.

[context-mode](https://github.com/mksglu/context-mode) is a free, open-source MCP plugin that solves one of the most quietly expensive problems in AI-assisted coding: the context window filling up with raw tool output. Every MCP tool call dumps raw data into your context window. A Playwright snapshot costs 56 KB. Twenty GitHub issues cost 59 KB. One access log , 45 KB. After 30 minutes, 40% of your context is gone. The project has crossed 18,000 GitHub stars and 300,000+ developers run it locally, with reported adoption at teams inside Microsoft, Google, Meta, NVIDIA, and Stripe.

## The hidden cost of every tool call

AI coding agents operate within a finite context window. Each tool call an agent makes , reading a file, listing a directory, or taking a browser snapshot , returns its full raw output directly into that window. The output stays there for the duration of the session, consuming tokens on every subsequent request even when the content is no longer relevant.

Performing a handful of these operations early in a session can consume over 143,000 tokens , more than 70% of a 200k token context window , before any substantial coding has begun. Once the context approaches its limit, the agent is forced to compact: older content is summarized and discarded to make room. This causes the AI to lose track of requirements given earlier, forget the structure of files it just edited, and sometimes repeat failed approaches because it no longer has a record of what it already tried. A productive session can degrade to ineffectiveness within 30 minutes under these conditions.

## Four problems, one plugin

context-mode attacks the problem from four angles simultaneously. Understanding each one is key to understanding why the savings are so large.

* **Context Saving:** Sandbox tools keep raw data out of the context window. 315 KB becomes 5.4 KB , a 98% reduction.
* **Session Continuity:** Every file edit, git operation, task, error, and user decision is tracked in SQLite. When the conversation compacts, context-mode doesn't dump this data back into context , it indexes events into FTS5 and retrieves only what's relevant via BM25 search. The model picks up exactly where you left off.
* **Think in Code:** The LLM should program the analysis, not compute it. Instead of reading 50 files into context to count functions, the agent writes a script that does the counting and

_Preview only. Full text requires an AlphaSignal Pro account._

## Sources

- [mksglu/context-mode — GitHub](https://github.com/mksglu/context-mode)
- [Context Mode — Official Website](https://context-mode.com)
- [Context Mode Benchmark Results](https://github.com/mksglu/context-mode/blob/main/BENCHMARK.md)
- [Context Mode: Reducing AI Context Bloat with an MCP Server — Better Stack](https://betterstack.com/community/guides/ai/context-mode-mcp/)
- [context-mode Review — VibeCodingHub](https://vibecodinghub.org/tools/context-mode)
