# What is Context Mode?

Context Mode is a gateway between your coding agent, such as Claude Code, Codex, OpenCode or Pi, and the model API. It folds tool output the first time the model sees it, checks tool calls against your rules, and shows what every request cost.

## Key facts

What it is

A hosted gateway on the request path of your coding agent, set with one base URL per agent. The main one of two products: Context Mode and the free Context Mode Engine.

Who it is for

Developers and teams who run coding agents such as Claude Code, Codex, OpenCode or Pi and want lower cost, one memory across their apps and one tool-call policy (enforced on Claude Code and Codex).

Clients

Claude Code, Claude Desktop, Codex, Codex Desktop, T3 Code, OpenCode and Pi. Anthropic and OpenAI models, paid by your own Claude or OpenAI account.

Measured result

Claude Code on Claude Opus 5.5 cost [65.5% less](https://contextmode.ai/benchmarks/long-session/ab.json) on a long agentic coding session, which went from [$7.20](https://contextmode.ai/benchmarks/long-session/ab.json) to [$2.49](https://contextmode.ai/benchmarks/long-session/ab.json), 4 of 4 pairs cheaper, run on 2026-10-03. Over 168 shorter paired runs on 2026-09-29, 155 cost less and 168 of 168 tasks passed in both arms. [Method and evidence](https://contextmode.ai/docs/benchmarks#long-session).

Limits

Runs on Cloudflare, with no on-premises build. SSO is by contract only. Codex cost is measured per request; no Codex A/B yet. Its own tools, memory and skills add tokens, and the benchmarks count them. Protect blocks calls in Claude Code and Codex; in Pi it only records them. OpenCode and Pi need your own API key; a Claude subscription does not go through them.

01 your agent Your app, such as Claude Code, Codex, OpenCode or Pi, with its base URL set to **gateway.context-mode.com**.

02 gateway Folds tool output, trims tool schemas, adds memory and skills, checks Protect rules, records tokens and cost.

03 model API Anthropic or OpenAI, called with **your own credential**. Your provider bills you as before.

04 console **console.contextmode.ai** shows each request's tokens, cost and saving.

## What it saves

Our latest pre-registered paired runs against Claude Code going direct, on Claude Opus 5.5: everyday tasks on 2026-09-29, long sessions on 2026-10-03 and 2026-10-04. Task success was equal in both arms on every row.

| Category | Task | Pairs | Gateway vs direct |
| --- | --- | --- | --- |
| [Agentic Coding](https://contextmode.ai/docs/benchmarks#agentic-coding) | Code search ( `grep` over 150 files) | 16 | Opus 5.5: 29% lower cost (23 to 34%) |
| [Agentic Coding](https://contextmode.ai/docs/benchmarks#agentic-coding) | One-line edit | 12 | Opus 5.5: 28% lower cost (14 to 42%) |
| [Agentic Coding](https://contextmode.ai/docs/benchmarks#agentic-coding) | Repo history question ( `git log` , 320 commits) | 16 | Opus 5.5: 25% lower cost (16 to 34%) |
| [Large Tool-Output Handling](https://contextmode.ai/docs/benchmarks#tool-output) | One large log | 16 | Opus 5.5: 22% lower cost (15 to 30%) |
| [Large Tool-Output Handling](https://contextmode.ai/docs/benchmarks#tool-output) | One large JSON file | 12 | Opus 5.5: 21% lower cost (13 to 30%) |
| [Test-Driven Debugging](https://contextmode.ai/docs/benchmarks#test-debugging) | `npm test` fix loop, short | 16 | Opus 5.5: 22% lower cost (16 to 28%) |
| [Test-Driven Debugging](https://contextmode.ai/docs/benchmarks#test-debugging) | `npm test` fix loop, long | 12 | Opus 5.5: 21% lower cost (14 to 28%) |
| [Multi-Agent Orchestration](https://contextmode.ai/docs/benchmarks#multi-agent) | Three parallel subagents, then one more | 20 | Opus 5.5: 15% lower cost (12 to 19%) |
| [Long Agentic Coding Session](https://contextmode.ai/docs/benchmarks#long-session) | Long agentic coding session, Opus 5.5, 1M window | 4 | Opus 5.5: [65.5% lower cost](https://contextmode.ai/benchmarks/long-session/ab.json) (64.5 to 67.7%, lowest to highest pair), [$7.20](https://contextmode.ai/benchmarks/long-session/ab.json) to [$2.49](https://contextmode.ai/benchmarks/long-session/ab.json) |
| [Long Agentic Coding Session](https://contextmode.ai/docs/benchmarks#long-session) | Long agentic coding session, Opus 5.5, 200K window, Recall on | 3 | Opus 5.5: [37.6% lower cost](https://contextmode.ai/benchmarks/recall/200k-r2/ab.json) ( [30.7 to 44.3%](https://contextmode.ai/benchmarks/recall/200k-r2/ab.json) , lowest to highest pair), [$4.86](https://contextmode.ai/benchmarks/recall/200k-r2/ab.json) to [$3.04](https://contextmode.ai/benchmarks/recall/200k-r2/ab.json) ; [9 of 10](https://contextmode.ai/benchmarks/recall/200k-r2/ab.json) exact answers about early details against [4 of 10](https://contextmode.ai/benchmarks/recall/200k-r2/ab.json) |
| [Long-Context Data Analysis](https://contextmode.ai/docs/benchmarks#data-analysis) | Large documents processed with a script | 20 | Opus 5.5: 10% lower cost (4 to 15%) |

The gateway saves where tool output is large or repeats. Use only Context Saving, with Protect, Memory, Skills and Recall off, and the everyday-task rows show your saving: those runs had Protect and Recall off, and the tokens Memory added were counted against the gateway. [Every result for both models, with its method and evidence](https://contextmode.ai/docs/benchmarks).

## The feature map

[Context Saving](https://contextmode.ai/context-saving) Test, build, install and log output folded the first time the model sees it. The full output is archived. [Docs](https://contextmode.ai/docs/how-saving-works)

[Code Mode](https://contextmode.ai/code-mode) The agent writes a short script. The gateway runs it in a sandbox, or on your machine for local files, and only what it prints reaches the model. [Docs](https://contextmode.ai/docs/how-saving-works#code-mode)

[Protect](https://contextmode.ai/protect) Off until you turn it on. Balanced and Locked down stop commands that wipe a disk or delete your home folder, and your rules decide which sites, commands and scripts the agent may reach. [Docs](https://contextmode.ai/docs/protect)

[Recall](https://contextmode.ai/recall) A long coding agent session that never compacts: the model gets recent work and an index, and the agent fetches any older message or tool output from an archive, word for word except masked secrets and e-mail addresses. [Docs](https://contextmode.ai/docs/recall)

[Memory](https://contextmode.ai/memory) Facts from your turns, kept with two clocks and added on the first request of a conversation, and after the client summarises the conversation. It adds tokens to that request. [Docs](https://contextmode.ai/docs/memory)

[Skills](https://contextmode.ai/skills) Import skills from GitHub. The gateway adds the matching skill to the prompt. [Docs](https://contextmode.ai/docs/skills)

[Search](https://contextmode.ai/search) Prompts, commands and archived output from every session. Archived output reads back byte for byte, except secrets and e-mail addresses, which are masked before storage. [Docs](https://contextmode.ai/docs/search)

[Active Context](https://contextmode.ai/docs/active-context) How much history a thread keeps: 200K, 500K or 1M, set once in Settings. [Docs](https://contextmode.ai/docs/active-context)

[Instructions](https://contextmode.ai/docs/instructions) Standing instructions you write once, for every connected app. [Docs](https://contextmode.ai/docs/instructions)

[Session resume](https://contextmode.ai/session-resume) Open a Claude Code or Codex session on another machine, in either client. [Docs](https://contextmode.ai/docs/session-resume)

[Console](https://console.contextmode.ai) Tokens, cost and saving per request, by session, project and agent.

## The console

The console at [console.contextmode.ai](https://console.contextmode.ai) shows what the gateway did for your agents. Select a screen to open it full size.

These six screens show the author's own account over 30 days, Oct 3 to Nov 1, 2026. Read the numbers as one account's use, and read the [benchmarks](https://contextmode.ai/docs/benchmarks) for measured results.

[Console Overview page: money saved, AI spend, prompt-cache discount and cost per request for 30 days, with a bar chart of money per day.](https://contextmode.ai/console/overview-full.webp)

Overview shows the money saved, the AI spend and the prompt-cache discount for each day, with the cost per request.

[Console Analytics page: saved dollars, tokens kept out and requests counted, with a chart of the saving over time split by cause.](https://contextmode.ai/console/analytics-full.webp)

Analytics shows the saving over time, split by source: unused tools hidden, large outputs kept out, old results archived and context trimmed.

[Console Spend page: AI spend, cost per request and cache hit rate, with a chart of spend per day by model.](https://contextmode.ai/console/spend-full.webp)

Spend shows the cost per day by model, the cost per request and the cache hit rate.

[Console Skills page: import a skill from a GitHub repository, then a list of installed skills with an on and off switch for each.](https://contextmode.ai/console/skills-full.webp)

Skills keeps one list of skills on the gateway. Each skill has its own on and off switch, and every machine uses the same list.

[Console Memory page: dollars saved by Recall, searches run, the share that found an answer, and a chart of the saving per day.](https://contextmode.ai/console/memory-full.webp)

Memory shows the money Recall saved, the searches run and how many found an answer. Facts carry from one session to the next.

[Console Protect page with the new command rule editor open: program, subcommand, flags and environment values, with Block and Enforce selected.](https://contextmode.ai/console/protect-full.webp)

Protect checks each command before it runs. This editor builds a rule for a command such as terraform destroy.

## What changes

- Tool output is folded once and sent the same way on every later turn, so the prompt cache keeps reading it.
- Tool schemas are trimmed. The gateway adds its own tools, memory and skills, and those cost tokens. The benchmarks count both sides.
- Protect, once you turn it on, checks each tool call. A blocked command never runs: your terminal runs only an echo that carries the refusal.
- Every request is recorded: tokens, cost and saving.

## What does not change

- Your agent, your model and your subscription. The gateway forwards your credential, and we do not resell tokens.
- No plugin or background service is installed. The CLI edits each app's own config and keeps a backup.
- Nothing is cut silently. A folded result ends with a line that says what was dropped and how to read the rest.
- To leave, [remove the lines the CLI added](https://contextmode.ai/docs/cli). Your agent then talks to the model API directly.

## Plans

Start free: 10,000 requests, every feature, no card. Every plan has every feature. For what works in each app, see [Your app](https://contextmode.ai/docs/quick-start#apps). Free gives 10,000 requests every month, and at the limit requests stop until the 1st. Standard gives a whole team 10,000,000 requests a month in one pool, with any number of members and team Protect rules. Past that, requests stop until your billing month resets, or the admin turns on extra requests within a budget. [Plans and limits](https://contextmode.ai/docs/plans-and-limits).

## Where it fits

How does Context Mode compare with other tools? See the [landscape](https://contextmode.ai/docs/landscape): gateways, token optimizers, agent firewalls, memory layers and more.

## Context Mode Engine

Context Mode has two products. The Gateway, on this page, is the main one. [Context Mode Engine](https://contextmode.ai/engine) is the free context-mode plugin, where it started: it keeps tool output out of one agent's context window, on your machine, in 18 AI coding tools, with no account.

[Connect your agent](https://contextmode.ai/docs/quick-start) [See the benchmarks](https://contextmode.ai/docs/benchmarks) [Open the console](https://console.contextmode.ai)
