v1.0.0
The other half of the context problem.
B. Mert Koseoglu
github.com/mksglu/context-mode
Every MCP tool call returns its full output directly into the model's 200K context window. With 81+ tools active, 143K tokens (72%) are consumed before the first user message.
After 30 minutes, 40% of available context is gone. When the agent compacts to free space, it forgets files, tasks, and decisions.
| Operation | Raw Output | Context Mode | Saved |
|---|---|---|---|
| Playwright snapshot | 56.2 KB | 299 B | 99% |
| GitHub Issues (20) | 58.9 KB | 1.1 KB | 98% |
| Access log (500 req) | 45.1 KB | 155 B | 100% |
| Analytics CSV (500 rows) | 85.5 KB | 222 B | 100% |
| Repo research (subagent) | 986 KB | 62 KB | 94% |
| Test output (30 suites) | 6.0 KB | 337 B | 95% |
Each call spawns an isolated subprocess. Scripts cannot access each other's memory or state.
Authenticated CLIs pass through—gh aws gcloud kubectl docker inherit credentials without exposing them to context.
11 runtimes: JavaScript, TypeScript, Python, Shell, Ruby, Go, Rust, PHP, Perl, R, Elixir.
When output exceeds 5 KB with an intent, Context Mode auto-indexes into FTS5 and returns only matching sections.
SQLite FTS5 with BM25 ranking. Three-layer fuzzy search for fault-tolerant queries.
Smart Snippets — windows around query matches with heading context, not truncation. You get the exact code block you need.
Progressive Throttling — calls 1–3 normal, 4–8 reduced, 9+ blocked. Prevents the model from exhausting the knowledge base in a single turn.
Source Scoping — search can target a specific indexed source, so React docs don't interfere with API references.
When context compacts, the model forgets everything. Context Mode captures events across the session and restores state automatically.
| Feature | Claude Code | Gemini CLI | VS Code Copilot | OpenCode | Codex CLI |
|---|---|---|---|---|---|
| MCP Server | ✓ | ✓ | ✓ | ✓ | ✓ |
| PreToolUse Hook | ✓ | ✓ | ✓ | Plugin | — |
| Session Continuity | Full | High | High | High | — |
| Can Block Tools | ✓ | ✓ | ✓ | Plugin | — |
| Plugin Marketplace | ✓ | — | — | — | — |
Hook enforcement matters — one unrouted Playwright snapshot can wipe an entire session's savings.
Same permission rules you already use—extended to the MCP sandbox. Zero additional configuration.
/install context-mode
npm install -g context-mode
Open Source · Elastic License 2.0 · Node.js 18+
github.com/mksglu/context-mode
Stop feeding your context window raw bytes.
Feed it answers.