Skip to content
aicoolies logo
Context Mode logo

Context Mode

Keep raw tool output out of your coding agent's context window

Source-available (ELv2) MCP server and plugin that sandboxes tool output, indexes it locally in SQLite FTS5 and preserves session state across compactions for Claude Code, Codex CLI, Cursor, Gemini CLI and other coding agents. A separate hosted control plane adds paid request-based plans.

About Context Mode

Context Mode started as an open-source MCP server and plugin for AI coding agents, now branded the Context Mode Engine. It attacks context-window bloat from tool output. Instead of letting raw Playwright snapshots, logs, API responses or file dumps flow into the conversation, its sandbox tools (ctx_execute, ctx_execute_file, ctx_batch_execute) run code in an isolated subprocess, and only stdout reaches the model. Larger outputs can be indexed into a local SQLite FTS5 knowledge base and retrieved with BM25 search (ctx_index, ctx_search, ctx_fetch_and_index).

The Engine also tracks session events such as file edits, git operations, tasks, errors and decisions in SQLite. After the agent compacts its conversation, it retrieves only the relevant events instead of re-injecting everything. Hooks (PreToolUse, PostToolUse, SessionStart, PreCompact and others, depending on the host) route the agent toward the sandbox tools. The sandbox supports 12 language runtimes.

The project's README reports large savings from its own benchmarks, for example a 56.2 KB Playwright snapshot reduced to 299 B. It also says 315 KB of raw output in a full session becomes 5.4 KB, which is the source of the widely quoted "98% reduction" figure. These numbers are vendor-measured on selected scenarios and have not been independently verified, so real savings depend on your workload.

Platform support is broad. The README compatibility table lists 18 hosts, including Claude Code, Codex CLI, Gemini CLI, Cursor, VS Code Copilot, GitHub Copilot CLI, OpenCode, Kiro and Antigravity. Hook coverage differs per host, and Claude Code has the most complete integration via its plugin marketplace.

The Engine is licensed under the Elastic License 2.0 (source-available, not OSI open source). You can use, fork, modify and redistribute it, but you may not offer it as a hosted or managed service or remove licensing notices. The README states that the Engine sends no telemetry and needs no account, with data kept in local SQLite databases.

In 2026 the company added a separate hosted product, positioned as a control plane for coding agents. It is installed with npx @context-mode/cli (MIT-licensed npm package) and sits between Claude Code or Codex and the model provider, adding context saving, session recall, memory and Protect policy rules. That hosted gateway runs in Context Mode's cloud, a dedicated instance, or the customer's Cloudflare account on Enterprise, so its data path differs from the local-only Engine. Pricing for the hosted product is request-based, and the Engine plugin remains free.

Pricing & Platform Specs

Pricing Summary

The Context Mode Engine (MCP server/plugin) is free under the Elastic License 2.0. The hosted Context Mode control plane is billed per request: Free ($0, 1,000 requests once), Pro ($49/month or $490/year, 50,000 requests/month), Team (per seat, 2+ seats, 50,000 requests/month per seat, contact sales) and Enterprise (custom yearly contract). Model usage is paid through your own Anthropic or OpenAI account.

full pricing breakdown →

Supported Platforms

MCP server and plugin for 18 coding agents per the README compatibility table (Claude Code, Codex CLI, Gemini CLI, Cursor, VS Code Copilot, GitHub Copilot CLI, OpenCode, Kiro, Antigravity and more); hosted CLI gateway currently for Claude Code and Codex

Explore categories, tags & use cases

Categories

Side-by-Side Comparisons

Caveman logo
Caveman
vs
Context Mode logo
Context Mode

Caveman vs Context Mode: Local Token Cutter or Hosted Agent Gateway?

Caveman and Context Mode both promise to make AI coding agents such as Claude Code and Codex spend fewer tokens, and Context Mode's own landscape page lists Caveman among token and context optimizers. They get there in different ways. Caveman is an Apache-2.0 CLI, skill and SDK that runs on your machine, shortens what the agent says and reads, and can route each ask to a cheaper model. Context Mode is mainly a hosted gateway for Claude Code and Codex with request-based plans, plus a free, source-available local plugin called Context Mode Engine. This comparison is based on each vendor's documentation, pricing pages, repositories and published benchmarks, checked on October 17, 2026; we did not run our own tests.

CavemanContext Mode

Community experience

Sources & verification

Sources checked
Content verified

Verification dates are editorial checks. Routine CMS saves and automatic updatedAt timestamps do not advance them.

FAQ

What is Context Mode?

Source-available (ELv2) MCP server and plugin that sandboxes tool output, indexes it locally in SQLite FTS5 and preserves session state across compactions for Claude Code, Codex CLI, Cursor, Gemini CLI and other coding agents. A separate hosted control plane adds paid request-based plans.

Is Context Mode free?

Context Mode offers a free tier alongside paid plans. The Context Mode Engine (MCP server/plugin) is free under the Elastic License 2.0. The hosted Context Mode control plane is billed per request: Free ($0, 1,000 requests once), Pro ($49/month or $490/year, 50,000 requests/month), Team (per seat, 2+ seats, 50,000 requests/month per seat, contact sales) and Enterprise (custom yearly contract). Model usage is paid through your own Anthropic or OpenAI account.

Is Context Mode still maintained?

Yes — Context Mode is active. Its listing was last verified on October 15, 2026.