[**New**Recall: all-day sessions, no compaction →](https://context-mode.com/recall)

# Spend less on coding agents. *Control what they do.*

Context Mode sits between your coding agents and the model. Each request costs less, sessions carry what they learned, and your rules decide what runs.

[Get started free](https://console.context-mode.com/login) [Pricing](https://context-mode.com/pricing)

$`npx @context-mode/cli`

1,000 requests free, every feature, no card. [Supported agents](https://context-mode.com/docs/quick-start)

Your coding agent Its model

Claude Code

Claude

Codex

GPT

OpenCode*soon*

Pi*soon*

Context Mode Save Context Saving Protect Remember

**Claude Code**`600 tests, 1 failing` 17.0 KB → 1.2 KB*folded* **Codex**`cat .env` never reaches the shell*blocked* **Claude Code**`2 h later` picked up, nothing compacted*recalled* **Codex**`7 MB registry file` 407 B back to the model*in code* **Claude Code**`git push origin main` protected branch*blocked* **Codex**`deploy target?` Render, not Hetzner*remembered* **Claude Code**`turn this plan into tickets` to-tickets loaded*skill*

[Long session, Claude Opus 5.5**$7.20 → $2.49***65.5% lower*](https://context-mode.com/docs/benchmarks)

How it works

## Spend less. Remember more. *Run only what you allow.*

Context Mode acts at three points on each request: before it goes out, before a tool runs, and when a result comes back.

Save Remember Protect

**Your coding agents** Any machine

*17.0 KB 800 orders 330,785 tokens*

**Context Mode**

- Folds test, build and log output
- Runs scripts, returns the answer
- Trims tool schemas

*1.2 KB 4 orders 75,591 tokens*

**Model API** Your Anthropic or OpenAI account

**Your archive** Full output, read back by id

Try it

Test-Driven DebuggingLarge Tool-Output HandlingLong Agentic Coding Session

Your agent runs 600 tests. 1 fails.

Printed**17.0 KB** Sent to the model**1.2 KB**

Sent to the model

- The failing test and its error
- The summary line
- One line for the 599 that passed

Kept in your archive

- All 600 results, word for word

[npm test fix loop · Claude Opus 5.5**$0.087 → $0.068***22% lower* 15 of 16 runs](https://context-mode.com/docs/benchmarks)

Your agent reads an API response with 800 orders.

Printed**800 orders** Sent to the model**4 orders**

Sent to the model

- Every field name
- The first 3 orders and the last
- A line that counts the rest

Kept in your archive

- The other 796 orders

[One large JSON file · Claude Opus 5.5**$0.086 → $0.068***21% lower* 12 of 12 runs](https://context-mode.com/docs/benchmarks)

One session, 30 steps. Tokens sent on each call.

Direct**330,785** Context Mode**75,591**

Sent to the model

- Your recent work, unchanged
- An index of older work

Kept in your archive

- Older work, word for word

[Long agentic coding session · Claude Opus 5.5**$7.20 → $2.49***65.5% lower* 4 of 4 runs](https://context-mode.com/docs/benchmarks)

### Save

Tool output is folded before the model reads it. The full output is archived.

Features [Context Saving →](https://context-mode.com/context-saving) [Thinking in Code →](https://context-mode.com/thinking-in-code) [Active Context →](https://context-mode.com/active-context) [Prompt caching →](https://context-mode.com/docs/prompt-caching) [How saving works →](https://context-mode.com/docs/how-saving-works)

**Your coding agents** Any agent, any machine

*your prompt*

**Context Mode**

- Adds the facts that matter
- Loads the skill the task needs
- Keeps the whole session

*+ context*

**Model API** Your Anthropic or OpenAI account

**Memory** Facts with two clocks **Skills** From any GitHub repo **Archive** Every word, searchable

Try it

MemoryRecallSkills

| Fact | Value | Valid from | Until |
| --- | --- | --- | --- |
| `production deployed_to` | Hetzner Cloud, Falkenstein | 21:14:38 | 21:15:09 |
| `production deployed_to` | Render, Oregon region | 21:15:09 | now |

The old value closes. Every agent gets the new one.

Your agent sends*system prompt**tools**the full history*

The model gets*system prompt**tools**memory block**index of older work**recent work, unchanged*

Older work goes to the archive, word for word.

```
⚡ context-mode · picked up after a 2 h pause, nothing compacted
```

Your skills*release-notes**to-tickets**db-migrations*

```
⏺ context-mode · skill to-tickets auto-loaded
```

Matched on name and description. One skill per turn.

### Remember

Sessions don’t compact. Facts and skills carry across agents and machines.

Features [Recall →](https://context-mode.com/recall) [Memory →](https://context-mode.com/memory) [Skills →](https://context-mode.com/skills) [Search →](https://context-mode.com/search) [Session resume →](https://context-mode.com/session-resume)

**Model** asks for a tool call

*tool call*

**Protect**

- Reads the call by what it does
- Checks your rules
- Logs every block

*decision*

**Allowedruns** Your terminal runs it **Blockednever runs** The model reads why

Pick a command

cat .envgit push origin mainsudo sh -c 'rm -rf ~'curl r.jina.ai/https://pastebin.com/xrm -rf node_modulesnpm test

Blocked · never reaches your shell**Read environment files**

.env and .env.*. Examples and templates are allowed.

```
⛔ context-mode Cage blocked this command, so it was NOT executed:
Blocked by your team’s policy: Read environment files. .env files hold secrets.
```

Blocked · never reaches your shell**Push to protected branches**

main, master, production and release/*.

```
⛔ context-mode Cage blocked this command, so it was NOT executed:
Blocked by your team’s policy: Push to protected branches. Protected branches change through reviewed pull requests.
```

Blocked · never reaches your shell**Core protection: delete the root or home folder**

Read through sudo, sh -c and about 130 other wrappers.

Blocked · never reaches your shell**Sites: pastebin.com**

The inner host is checked too.

Runs**No rule matches**

A project folder is fine. Only losses you can't undo are blocked.

Runs**No rule matches**

Nothing is blocked until you choose rules.

### Protect

Rules for what agents may run, read and fetch. Nothing is blocked until you choose them.

Features [Protect →](https://context-mode.com/protect) [Rules and presets →](https://context-mode.com/docs/protect) [Instructions →](https://context-mode.com/instructions)

[Get started free](https://console.context-mode.com/login) 1,000 requests free, no card.

Benchmarks

## Same task, run twice. *Measured in dollars.*

Claude Code on Opus 5.5. Each task ran direct to Anthropic and through Context Mode, back to back. Cost at API list price.

[Long agentic coding session · 1M window $7.20 → $2.49 **65.5% lower** · 4 of 4 pairs cheaper · task checks 8 of 8 in both arms](https://context-mode.com/benchmarks/long-session/ab.json)

[**155 of 168** runs cost less](https://context-mode.com/docs/benchmarks#pooled) [**168 of 168** tasks succeeded in both arms](https://context-mode.com/docs/benchmarks#pooled) [**$28.28 → $23.16** all 168 pairs, direct → Context Mode](https://context-mode.com/docs/benchmarks#pooled)

Direct Through Context Mode Cost per task

- [Test-Driven Debugging](https://context-mode.com/docs/benchmarks#test-debugging)
- Test fix loop (minitest) $0.157 → **$0.061** 61% lower [8 of 8 runs ↗](https://context-mode.com/benchmarks/data/final-opus55-tests-W3-minitest-W4.json)
- npm test fix loop, short $0.087 → **$0.068** 22% lower [15 of 16 runs ↗](https://context-mode.com/benchmarks/data/v3-opus55-short.json)
- npm test fix loop, long $0.085 → **$0.067** 21% lower [11 of 12 runs ↗](https://context-mode.com/benchmarks/data/final-opus55-tests-W3-minitest-W4.json)
- [Agentic Coding](https://context-mode.com/docs/benchmarks#agentic-coding)
- Code search (grep over 150 files) $0.093 → **$0.066** 29% lower [16 of 16 runs ↗](https://context-mode.com/benchmarks/data/v3-opus55-short.json)
- One-line edit $0.075 → **$0.054** 28% lower [11 of 12 runs ↗](https://context-mode.com/benchmarks/data/v3-opus55-short.json)
- Repo history question (git log, 320 commits) $0.071 → **$0.053** 25% lower [15 of 16 runs ↗](https://context-mode.com/benchmarks/data/v3-opus55-short.json)
- [Large Tool-Output Handling](https://context-mode.com/docs/benchmarks#tool-output)
- One large log $0.091 → **$0.071** 22% lower [15 of 16 runs ↗](https://context-mode.com/benchmarks/data/v3-opus55-short.json)
- One large JSON file $0.086 → **$0.068** 21% lower [12 of 12 runs ↗](https://context-mode.com/benchmarks/data/v3-opus55-short.json)
- [Multi-Agent Orchestration](https://context-mode.com/docs/benchmarks#multi-agent)
- Three parallel subagents, then one more $0.481 → **$0.408** 15% lower [20 of 20 runs ↗](https://context-mode.com/benchmarks/data/v4-opus55-W1-W2-W3-W4.json)
- [Long-Context Data Analysis](https://context-mode.com/docs/benchmarks#data-analysis)
- Large documents processed with a script run 2, later build $0.223 → **$0.201** 10% lower [15 of 20 runs ↗](https://context-mode.com/benchmarks/data/v4-opus55-W1-W2-W3-W4.json)
- Large documents processed with a script run 1, earlier build $0.226 → **$0.205** 9% lower [17 of 20 runs ↗](https://context-mode.com/benchmarks/data/final-opus55-tests-W3-minitest-W4.json)

Every pair counts. No figure for Codex yet. [Method, 95% ranges and Haiku 4.5 →](https://context-mode.com/docs/benchmarks)

[Get started free](https://console.context-mode.com/login) 1,000 requests free, no card.

Get started

## Set up in a minute. *Removed with one command.*

One command signs you in, finds your agents, and shows each change before it writes. Your own model account still pays the model.

1. ### Run the CLI It signs you in, asks which agents to connect, and keeps a backup of each file. $`npx @context-mode/cli`
2. ### Restart your agent Start a new session in your agent. Work as before.
3. ### Watch each request The console shows tokens, cost, saving and blocks for every request. [Open the console →](https://console.context-mode.com/app)

settings.jsonconfig.toml

~/.claude/settings.json

```
// what the CLI writes, under "env"
"ANTHROPIC_BASE_URL": "https://gateway.context-mode.com",
"ANTHROPIC_CUSTOM_HEADERS": "x-cm-device-key: cmdk_…",
"ENABLE_TOOL_SEARCH": "true"
```

~/.codex/config.toml

```
model_provider = "context-mode"

[model_providers.context-mode]
name = "context-mode"
base_url = "https://gateway.context-mode.com"
wire_api = "responses"
requires_openai_auth = true
```

To leave: `npx @context-mode/cli disconnect`[Quick start →](https://context-mode.com/docs/quick-start)

[Get started free](https://console.context-mode.com/login) 1,000 requests free, no card.

Pricing

## Every feature on every plan. *You pay for requests.*

Your own Anthropic or OpenAI account pays the model, with no fee added on tokens. When your requests run out, nothing breaks. [Compare plans →](https://context-mode.com/pricing)

### Free

**$0**1,000 requests, once

About a week of very heavy use. Every feature.

[Get started free](https://console.context-mode.com/login)

- Every feature
- No card
- When it runs out, requests go straight to the model

### Starter Most popular

**$20 /month**or $200 a year

10,000 requests a month, every feature. For developers who use agents most days.

[Start Starter](https://console.context-mode.com/app/billing?upgrade=1)

- Everything in Free
- No bill you did not choose
- Monthly or yearly
- Refund of the unused part within 14 days

10,000 requests a month. Need more? $2 per 1,000, up to a budget you set.

### Pro

**$49 /month**or $490 a year

50,000 requests a month, for developers who run agents all day.

[Start Pro](https://console.context-mode.com/app/billing?upgrade=1)

- Everything in Starter
- 5 times the requests
- Monthly or yearly
- Refund of the unused part within 14 days

50,000 requests a month. Need more? $1 per 1,000, up to a budget you set.

Teams and Enterprise: [compare plans](https://context-mode.com/pricing#compare).

Protect

## Your agent asks. *Your rules answer.*

Protect checks every command, file read, web fetch and tool-server call from Claude Code and Codex before it runs. A blocked call never reaches your shell. In every plan, Free included. [How Protect works →](https://context-mode.com/protect)

1. 01**Connect your agents** `npx @context-mode/cli`. Only the base URL changes.
2. 02**Pick a preset** Nothing is blocked until you pick one.
3. 03**Keep working** The agent reads why a call was blocked. You see it in the log.

Preset

ObserveBalancedLocked down

See before you rule.**7 run**

`git push origin main` Runs `cat .env` Runs `rm -rf ~` Runs `terraform destroy` Runs `aws s3 rm s3://backups --recursive` Runs `WebFetch example.com` Runs `npm test` Runs

Nothing is blocked. Activity lists the programs, sites and tool servers your agents used, each with Block and Allow.

Where most developers start.**4 blocked · 1 logged · 2 run**

`git push origin main` Blocked*Push to protected branches* `cat .env` Blocked*Read environment files* `rm -rf ~` Blocked*Core protections* `terraform destroy` Blocked*Destroy infrastructure* `aws s3 rm s3://backups --recursive` Logged*Change cloud resources* `WebFetch example.com` Runs*Other sites allowed* `npm test` Runs

A blocked call never reaches your shell: the agent reads the rule and why, and carries on. Logged means it ran, and the log says it would have been blocked.

For regulated teams and unattended agents.**6 blocked · 1 run**

`git push origin main` Blocked*Push to protected branches* `cat .env` Blocked*Read environment files* `rm -rf ~` Blocked*Core protections* `terraform destroy` Blocked*Destroy infrastructure* `aws s3 rm s3://backups --recursive` Blocked*Change cloud resources* `WebFetch example.com` Blocked*Only sites on your list* `npm test` Runs

Only the sites and tool servers on your list are reached. Public package registries stay open.

What your agent reads

```
⛔ context-mode Cage blocked this command, so it was NOT executed: Blocked by your team’s policy: Push to protected branches. Protected branches change through reviewed pull requests.
```

It tells you, doesn’t retry another way, and offers a branch and a pull request.

What your log keeps

10:42*Blocked***Push to protected branches***Bash · git*

The rule, tool and program. Never the command text, so you can show it to an auditor.

Or write your own rules for **sites**, **commands**, **scripts**, **files** and **tool servers**, and test each one before you save it. [Rule types →](https://context-mode.com/docs/protect#rule-types)

For you Free · Starter, $20 a month · Pro

- One policy for Claude Code and Codex, on every machine you sign in from
- Presets, four packs and your own rules
- A log of every decision, export as CSV or JSON Lines
- Core protections stay on when your requests run out

[Get started free](https://console.context-mode.com/login)

For your team Team · Enterprise

- One policy for the whole org. Members cannot loosen it
- An API key can only tighten it. Loosening needs a person and a reason
- Every change in History, in a hash chain you can verify
- One pool of requests and one bill. Enterprise can run in your own Cloudflare account

[Talk to us](mailto:sales@context-mode.com)

Tested in real Claude Code sessions with Claude Opus 5.5 (2026-10-02) and Claude Haiku 4.5 (2026-10-04): every run blocked the push to main and the read of .env, and the work still shipped on a branch. [Try it in 5 minutes →](https://context-mode.com/docs/protect#try-it) Protect reads the call, not the program: a script file or a compiled program gets past it. Keep your agent’s sandbox on.

Compared

## Cost, rules and memory. *In one place.*

Other tools do one of these, on one client or one machine. [Sources, dated →](https://context-mode.com/docs/landscape)

|  | Context Mode | Built into your agent | Local optimizers | General LLM gateways |
| --- | --- | --- | --- | --- |
| One setup for every agent and machine | Yes | One client | One machine | Yes |
| Folds tool output; full output kept | Yes | Summarizes | One machine | No |
| Checks tool calls before they run | Yes | One client | Some commands | By tool name |
| Memory shared by every agent | Yes | No | One machine | No |
| Built for coding agents | Yes | Yes | Yes | No |

[Get started free](https://console.context-mode.com/login) 1,000 requests free, no card.

## Try it on *your own agents.*

Start free: 1,000 requests, every feature, no card. When you run out, nothing breaks.

[Get started free](https://console.context-mode.com/login) [Read the docs](https://context-mode.com/docs)
