A tool that sandboxes MCP tool output and claims 98% context token reduction just crossed 12,365 stars on GitHub. It did this in under two months.

The tool is context-mode (mksglu/context-mode), and its growth trajectory tells a story about where AI coding agents are hitting walls right now. Context windows are getting larger, but the tools that feed them are getting noisier. A single Playwright snapshot costs 56KB. Twenty GitHub issues cost 59KB. One access log costs 45KB. After 30 minutes of work, 40% of your context window is gone to tool output that the model will never reference again.

context-mode addresses this from four sides simultaneously. It is the most complete context management tool currently available for AI coding agents. Here is what it does, how it grew so fast, and what its rise says about the market.

What context-mode Does

context-mode is an MCP server that solves four context problems at once:

Context Saving. Sandbox tools keep raw data out of the context window. The headline number: 315KB becomes 5.4KB. That is a 98% reduction. Instead of dumping a Playwright snapshot or a GitHub issue dump into the model's context, context-mode indexes the data in SQLite and retrieves only what is relevant when the model asks for it.

Session Continuity. Every file edit, git operation, task, error, and user decision is tracked in SQLite. When the conversation compacts (and it always compacts eventually), context-mode does not dump this data back into context. It indexes events using FTS5 full-text search and retrieves them via BM25 ranking. The model picks up where you left off. If you do not use --continue, previous session data is deleted immediately. A fresh session means a clean slate.

Think in Code. Instead of reading 50 files into context to count functions, the agent writes a script that does the counting and console.log()s only the result. One script replaces ten tool calls and saves 100x context. context-mode calls this ctx_execute(). The model generates the analysis code, context-mode runs it, and only the result enters the context window. This is mandatory across all 14 supported platforms.

Output Compression. A terse output mode strips articles, filler words, pleasantries, and hedging from model responses. Technical substance is preserved. Code is unchanged. The pattern: [thing] [action] [reason]. [next step]. This achieves approximately 65-75% output token reduction while maintaining full technical accuracy. Security warnings, irreversible actions, and user confusion triggers auto-expand to full verbosity.

The Growth Story

context-mode went from approximately 6,000 stars to 12,365 stars in under two months. The current commit history shows releases through v1.0.111 (the latest visible commit as of this writing). The repo has 856 forks and a primarily TypeScript codebase (57.3% TypeScript, 40% JavaScript).

The growth is not accidental. Three factors drive it:

MCP adoption. The Model Context Protocol has become the standard integration layer for AI coding agents. Every major platform now supports MCP servers. context-mode is an MCP server, which means it works with any MCP-compatible client without custom integration.

The 14-platform claim. context-mode supports Claude Code, Gemini CLI, VS Code Copilot, JetBrains Copilot, Cursor, Windsurf, Augment, Aider, Cline, Roo Code, Amazon Q Developer, Codex CLI, Warp, and Zed. That is 14 platforms with verified configurations. Most context management tools target one or two. Targeting 14 makes context-mode the de facto cross-platform option.

Plugin marketplace integration. On Claude Code, installation is two commands: /plugin marketplace add mksglu/context-mode and /plugin install context-mode@context-mode. No manual configuration. No YAML editing. This is the lowest-friction install of any context management tool currently available.

The Market Bifurcation

The context engineering tooling market is splitting into two categories:

Optimization tools reduce the amount of context that enters the window. context-mode is the current leader here. It sandboxes, indexes, and retrieves on demand instead of dumping everything in.

Observability tools show you what is inside the window and how it is being used. context-lens (326 stars) provides framework-agnostic context window visualization. It shows what the model sees, how much of it is tool output versus conversation, and where tokens are being wasted.

Both categories are growing fast. The optimization side has context-mode at 12K+ stars. The observability side has context-lens at 326 stars. The gap reflects adoption maturity: developers adopt optimization tools first because they solve an immediate pain (context exhaustion). Observability tools come later, when teams need to debug why their context strategy is not working.

The bifurcation mirrors what happened in observability generally. Prometheus (metrics collection) came before Grafana (visualization). OpenTelemetry (instrumentation) came before Jaeger (trace visualization). Optimization first, observability second. Same pattern.

How the Sandbox Works

The technical architecture is worth understanding because it explains the 98% claim.

When a tool call produces output (for example, Read returning a file's contents or Bash returning command output), context-mode intercepts it before it enters the context window. The output is stored in SQLite with FTS5 indexing. A compressed summary replaces the full output in the context window. When the model needs specific details, it calls ctx_search with a natural language query. BM25 ranking retrieves the relevant chunks, and only those chunks enter the context.

The session continuity system tracks 23 event categories: file edits, git operations, task state, errors, user decisions, tool calls, and more. Each event is timestamped, categorized, and indexed. When a conversation compacts, the model can query for any past event without re-reading the full context.

The ctx_insight command opens a local web UI with 90 metrics, 37 insight patterns, and 4 composite scores (productivity, quality, delegation, context health). This is the observability layer built into the optimization tool.

The ctxexecute command is the "Think in Code" paradigm. Instead of the model reading 50 files and counting lines itself, the model generates a JavaScript snippet that does the counting. context-mode runs the snippet in a sandboxed Node.js environment and returns only the result. One ctxexecute call replaces 50 Read calls and saves approximately 100x context.

Practical Considerations

Token savings are real but vary by workload. The 98% claim comes from the best case: large tool outputs (Playwright snapshots, GitHub issue lists, log files) that can be fully offloaded to SQLite. For workloads with mostly short tool outputs (simple file reads, single-command Bash), savings will be lower. The 65-75% output compression is more consistent across workloads.

The SQLite dependency is a feature, not a limitation. SQLite is embedded in the tool. No external database to manage. Session data stays local and is deleted when you start a fresh session. This is a privacy advantage over cloud-based context management.

Hook-based routing is automatic on supported platforms. On Claude Code, Gemini CLI, and other hook-capable platforms, context-mode injects routing instructions at session start. The model is nudged to prefer sandboxed tools over raw Bash/Read/WebFetch. On non-hook platforms, you need to copy a routing file manually.

The status line is useful. context-mode can show $ saved this session · $ saved across sessions · % efficient in Claude Code's status bar. Real-time feedback on token savings helps teams understand the ROI without measuring manually.

What the Rise Signals

context-mode's 12K stars in two months is not just a GitHub popularity metric. It is a signal that context window management has become a first-class concern for AI coding agent users.

Six months ago, most teams were still learning that context exhaustion was a problem. They would hit the limit, the model would compact, and important context would disappear. The fix was manual: re-paste the relevant files, restart the conversation, accept degraded output.

Today, the tooling exists to prevent context exhaustion before it happens. Sandbox the output. Index it. Retrieve it on demand. Compress the model's responses. Track session state in SQLite. This is the "other half of the context problem," as context-mode's tagline says. The first half was building context windows large enough to be useful. The second half is keeping them from filling up with noise.

The market agrees. 12K stars says the market agrees.


Citations

Suggested Title

context-mode Crosses 12K Stars: 98% Context Reduction Across 14 Platforms

Word Count

~1,400

Fact-Check Notes

  • 12,365 star count confirmed from GitHub repository as of May 2026
  • 856 forks confirmed from GitHub repository
  • 98% context reduction claim from context-mode README (315KB to 5.4KB example)
  • 14 platforms listed in README: Claude Code, Gemini CLI, VS Code Copilot, JetBrains Copilot, Cursor, Windsurf, Augment, Aider, Cline, Roo Code, Amazon Q Developer, Codex CLI, Warp, Zed
  • 65-75% output token reduction claim from README
  • Growth from 6K to 12K+ stars in under two months based on GitHub star history snapshots
  • context-lens star count (326) should be verified independently if cited in publication