Solution · For developers

# You run agents all day, and each new session forgets. *Pay for less, and keep your project facts.*

Context Mode runs between your agent and the model. It sends the model the failing test, not the ones that passed, and keeps your early details all day. Your npm test fix loop cost 22% less in paired runs.

[Get started free](https://console.contextmode.ai/login) [Read the docs](https://contextmode.ai/docs/quick-start)

Your day

npm test Hour six cat .env

Your agent runs 600 tests. 1 fails.

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

[npm test fix loop · Claude Opus 5.5 **$0.087 → $0.068** *22% lower* 15 of 16 pairs cost less](https://contextmode.ai/docs/benchmarks)

Late in a long session, you ask about the morning.

Direct **4 of 10** Context Mode **9 of 10**

Exact answers about early details, 200K window. Direct compacted 3 times; through Context Mode, 0.

Your agent tries to read your keys.

Blocked · stopped before your shell **Read environment files**

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

Protect is off until you turn it on. You pick the rules.

The problem

## You pay for every byte. *Then you explain it all again.*

**Long output, paid again**

A test run prints 17 KB. Your agent pays for every byte a tool prints, again on each later turn.

**Long sessions compact**

Early details get summarized away. The agent asks again, or guesses.

**New sessions start from zero**

You explain your deploy target and your stack each time.

How it works

## One command. *Keep your agent and your model.*

1. 01 **Run one command** Install your app the way its makers say first; the picker below shows each one. Then `npx @context-mode/cli` signs you in and connects your agents. It works with Claude Code, Claude Desktop, Codex, Codex Desktop, T3 Code, OpenCode and Pi. See the [quick start](https://contextmode.ai/docs/quick-start). Your own Anthropic or OpenAI account pays the model. We add no fee on tokens.
2. 02 **Each request gets smaller** Long tool output folds; errors stay in full. Older work goes to the archive, word for word.
3. 03 **The model reads less and remembers** Memory gives every agent the current facts, on any machine. Old details come back by lookup.

Your app

Claude Code Claude Desktop Codex Codex Desktop T3 Code OpenCode Pi

1 Install Claude Code from its makers: [Claude Code setup →](https://code.claude.com/docs/en/setup)

2 Connect Context Mode

`npx @context-mode/cli setup --agent claude`

**Writes** `~/.claude/settings.json`

**You need** Your Claude login, a subscription or an API key. Restart Claude Code.

1 Install Claude Desktop from its makers: [Download Claude →](https://claude.ai/download)

2 Connect Context Mode

`npx @context-mode/cli setup --agent claude-desktop`

**Writes** `Developer → Configure Third-Party Inference… (an entry named contextmode)`

**You need** Quit the app fully (Cmd+Q) and open it again. The Code and Cowork tabs go through Context Mode.

1 Install Codex from its makers: [Codex CLI →](https://developers.openai.com/codex/cli)

2 Connect Context Mode

`npx @context-mode/cli setup --agent codex`

**Writes** `~/.codex/config.toml`

**You need** Your Codex login: ChatGPT, or an API key stored with codex login --with-api-key. A key that is only exported in your shell is not sent.

1 Install Codex Desktop from its makers: [ChatGPT desktop app for macOS and Linux →](https://developers.openai.com/codex/app)

`winget install --id 9PLM9XGG6VKS -s msstore` *Windows*

2 Connect Context Mode

`npx @context-mode/cli setup --agent codex-desktop`

**Writes** `~/.codex/config.toml (the same file as the Codex CLI)`

**You need** Your Codex login. Quit the app fully (Cmd+Q) and open it again.

1 Install T3 Code from its makers: [T3 Code install docs →](https://github.com/pingdotgg/t3code/blob/main/docs/user/install.md)

`brew install --cask t3-code` *desktop app, macOS*

`curl -fsSL https://t3.codes/install.sh | sh` *CLI, macOS and Linux*

`winget install T3Tools.T3Code` *Windows*

2 Connect Context Mode

`npx @context-mode/cli setup --agent t3code`

**Writes** `~/.claude/settings.json and ~/.codex/config.toml`

**You need** T3 Code runs the Claude Code and Codex you have, with their logins. In Settings → Providers, keep CODEX_HOME at ~/.codex and leave Shadow home empty.

1 Install OpenCode from its makers: [OpenCode docs →](https://opencode.ai/docs/)

`curl -fsSL https://opencode.ai/install | bash`

`npm install -g opencode-ai`

`brew install anomalyco/tap/opencode`

2 Store your API key with OpenCode’s own login

`opencode auth login` *pick Anthropic, or set ANTHROPIC_API_KEY*

3 Connect Context Mode

`npx @context-mode/cli setup --agent opencode`

**Writes** `~/.config/opencode/opencode.json`

**You need** Your own Anthropic API key. OpenCode has no Claude sign-in, so a Claude subscription does not work here. No key is written to the file.

1 Install Pi from its makers: [Pi on GitHub →](https://github.com/earendil-works/pi)

`npm install -g @earendil-works/pi-coding-agent`

`curl -fsSL https://pi.dev/install.sh | sh`

2 Store your API key

Start `pi`, then type `/login` in Pi, not in your shell. Or set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY`.

3 Connect Context Mode

`npx @context-mode/cli setup --agent pi`

**Writes** `~/.pi/agent/models.json`

**You need** Your own Anthropic or OpenAI API key. A Claude subscription does not go through Pi. If you use one, setup sets only OpenAI.

Your agent sends everything as usual. Context Mode folds long output, archives older work, adds your current facts and, if you turn on Protect, checks each tool call. The model gets a smaller request.

Proof

## The same task, run twice. *Lower cost, same result.*

**22% lower** cost of a short npm test fix loop on Claude Opus 5.5, $0.087 to $0.068, 15 of 16 pairs

**155 of 168** shorter paired runs cost less; task checks passed equally in both arms

**9 of 10** early details answered exactly in a long session on a 200K window with Recall, against 4 of 10 direct

**0 compactions** in that 200K window run, against 3 direct

| Task | Context Mode | Direct | Lower |
| --- | --- | --- | --- |
| Code search, grep over 150 files | $0.066 | $0.093 | 29% |
| npm test fix loop, short | $0.068 | $0.087 | 22% |
| One large log | $0.071 | $0.091 | 22% |

Paired runs, Claude Opus 5.5, cost per task at API list price. The memory and compaction figures come from the 200K window run on [Recall](https://contextmode.ai/recall). For a long 30-step session, see [Cut agent spend](https://contextmode.ai/solutions/cut-agent-spend). [Method and sources →](https://contextmode.ai/docs/benchmarks)

Plans

## Start free. *Add your team when it pays for itself.*

**Free**

10,000 requests every month. Every feature, no card.

**Standard**

For the whole team: 10,000,000 requests a month in one pool, any number of members, team Protect rules. [See Pricing](https://contextmode.ai/pricing).

**More volume**

More than 10,000,000 requests a month? [Talk to us](https://cal.com/mksglu).

Every feature on every plan. At the limit, requests stop until the next period. [See plans and prices →](https://contextmode.ai/pricing)

Products used

## What this *uses.*

**[Context Saving](https://contextmode.ai/context-saving)**

Pay for the failing test, not the ones that passed.

**[Recall](https://contextmode.ai/recall)**

All-day sessions with no compaction. Older work is looked up word for word.

**[Memory](https://contextmode.ai/memory)**

Facts from your sessions, at their current value, in every agent.

**[Protect](https://contextmode.ai/protect)**

Keep .env files, main and your home folder safe. Off until you turn it on.

**[Quick start](https://contextmode.ai/docs/quick-start)**

Connect your agents in one command.

**[Pricing](https://contextmode.ai/pricing)**

Free and Standard, and a contract above them. Every feature on each.

Related: [Long sessions](https://contextmode.ai/solutions/long-sessions) · [For startups](https://contextmode.ai/solutions/startups) · [Benchmarks](https://contextmode.ai/docs/benchmarks)

## Keep your agent. *Pay for less of what it reads.*

*npx @context-mode/cli* connects your agents. 10,000 requests free every month, no card.

[Get started free →](https://console.contextmode.ai/login) [Read the docs →](https://contextmode.ai/docs/quick-start)
