# T3 Code now runs through Context Mode

October 28, 2026 Launch 6 min read

Thank you to the T3 Code team at pingdotgg for an open app, and to the community that builds on it. T3 Code runs the Claude Code and Codex you already have, with their own login and their own config. So one command connects both: `npx @context-mode/cli setup --agent t3code`. After a restart, every turn you start in T3 Code goes through Context Mode, and gets Saving, Memory, Skills and Instructions on every request. Here is how to install T3 Code, how to connect it, what setup changes, and what we have not verified yet.

## TL;DR

- **Install T3 Code its own way first:** `brew install --cask t3-code` on macOS, or `curl -fsSL https://t3.codes/install.sh | sh` for the CLI.
- **Then one command:** `npx @context-mode/cli setup --agent t3code`. It sets up Claude Code and Codex once each. Quit T3 Code fully and open it again.
- **Keep CODEX_HOME at `~/.codex`** in T3 Code's Settings → Providers, and set no Shadow home path.
- **What you get:** Saving, Memory, Skills, Instructions, Recall and Active Context, on every request. They are not measured in T3 Code yet.
- **Limits:** Protect is not verified through T3 Code. Claude Code turns from T3 Code show as Claude Code in the console. Undo with `npx @context-mode/cli disconnect --agent t3code`.

## How to install T3 Code

This post answers one question: how do you connect T3 Code to Context Mode? First, use T3 Code's own installer. These commands come from its [install docs](https://github.com/pingdotgg/t3code/blob/main/docs/user/install.md).

```
# macOS: the desktop app
brew install --cask t3-code

# macOS and Linux: the CLI and server (puts `t3` in ~/.local/bin)
curl -fsSL https://t3.codes/install.sh | sh
```

On Windows, use one of these:

```
winget install T3Tools.T3Code
scoop install extras/t3code
irm https://t3.codes/install.ps1 | iex
```

T3 Code does not bring its own model login. It runs the `claude` and `codex` you already have, signed in the way you always sign in. In the app, open **Settings → Providers**. Keep **CODEX_HOME** at `~/.codex` (the default), and do not set a **Shadow home path** ([T3 Code's Codex provider docs](https://github.com/pingdotgg/t3code/blob/main/docs/user/providers-codex.md)). That way T3 Code reads the same config file that setup writes.

## How to connect T3 Code to Context Mode

You need Node 20.12 or later. Run the command once. Not signed in yet? `npx @context-mode/cli` signs you in, and its picker lists T3 Code. Setup adds the device key once you are signed in.

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

Pick a step to see what each one does and prints.

Step

Install Set it up Restart Check

T3 Code's own installer first. Then keep its Codex home at the default.

```
$ brew install --cask t3-code
# or: curl -fsSL https://t3.codes/install.sh | sh
# then in T3 Code: Settings → Providers
CODEX_HOME          ~/.codex
Shadow home path    (empty)
```

Setup finds T3 Code by the `t3` binary on your PATH, or by the app in /Applications.

Setup names T3 Code's own step first. Then it shows each change and asks before it writes.

```
$ npx @context-mode/cli setup --agent t3code
Open T3 Code -> Settings -> Providers; keep CODEX_HOME at ~/.codex (default) so it reads the config setup writes; do not set a Shadow home path
Docs: https://github.com/pingdotgg/t3code/blob/main/docs/user/providers-codex.md

T3 Code (Claude Code config):
Settings: ~/.claude/settings.json
Changes to "env":
  …
Write these changes to ~/.claude/settings.json?

T3 Code (Codex config):
Config: ~/.codex/config.toml
Changes:
  …
Write these changes to ~/.codex/config.toml?
```

Shortened: the full output lists each key, the backup file and the docs page of each app. Add `--dry-run` to see the changes and write nothing.

T3 Code reads the config when it starts. Quit it fully, then open it again.

```
Next:
  1. Restart T3 Code: quit it fully and open it again; in Settings -> Providers keep CODEX_HOME at ~/.codex.
```

Closing the window is not enough. A running app keeps the old settings. `npx @context-mode/cli` prints this step after `Ready`.

Ask the CLI. Then look for your request in the console.

```
$ npx @context-mode/cli status
…
Setup:
  T3 Code       configured (~/.claude/settings.json and ~/.codex/config.toml, shared with Claude Code and Codex)

$ npx @context-mode/cli doctor
```

Your request shows on [console.contextmode.ai](https://console.contextmode.ai) within a minute. Codex turns from T3 Code show as T3 Code there.

If you run `npx @context-mode/cli` with no arguments instead, it signs you in, shows the picker with T3 Code checked when it finds it, writes each config, sends one check request per config, and prints one line each, then the console address and `Ready`. With only T3 Code picked, it looks like this:

```
T3 Code (Claude Code config) connected (workspace …)
T3 Code (Codex config) connected (workspace …)
Console: https://console.contextmode.ai
Ready
```

T3 Code is in the picker, or you name it with `--agent t3code`. It is not part of `--agent all`, which covers Claude Code and Codex only.

## What setup changes on your machine

T3 Code has no config of its own for the model route. So setup writes the two files T3 Code's agents read, once each. These are the same writes as `--agent claude` and `--agent codex`.

| File | What setup sets | Read by |
| --- | --- | --- |
| `~/.claude/settings.json` | Under `env` : `ANTHROPIC_BASE_URL` , the device key in `ANTHROPIC_CUSTOM_HEADERS` , `ENABLE_TOOL_SEARCH` . At the top level: `idleCompaction: false` . | Claude Code, in the terminal and in T3 Code |
| `~/.codex/config.toml` | `model_provider = "context-mode"` and a `[model_providers.context-mode]` table with the gateway and the device-key header. | Codex, in the terminal and in T3 Code |

How setup behaves, for every file:

- It shows the diff by key and asks first. It never prints or writes your API key.
- It copies the file to `<file>.cm-setup-bak-<timestamp>`, then writes in one atomic step.
- It changes only its own keys. A real TOML parser reads `config.toml`, so comments and other tables stay.
- If a file does not parse, it writes nothing.
- Your sign-in gives this terminal a device key (`cmdk_…`), stored in `~/.context-mode/credentials.json` with mode 0600. The gateway removes it before the request goes to Anthropic or OpenAI.

Flags you can add: `--dry-run` (show, write nothing), `--check` (write nothing, exit 0 when set up), `--yes` (write without the question). All commands are in the [CLI docs](https://contextmode.ai/docs/cli).

## Does T3 Code work with a gateway?

Yes. T3 Code starts the Claude Code and Codex on your machine, and each one reads its own config file. When those files point at Context Mode, the turns you start in T3 Code go through it too. You keep your agent, your model and your own login. Claude Code turns go to Anthropic. Codex turns go to OpenAI.

The one setting that can break this is T3 Code's own: a different CODEX_HOME, or a Shadow home path. We have not verified whether a Shadow home path reads `~/.codex/config.toml`, so setup asks you to leave it empty.

## What you get in T3 Code

The gateway does not switch features on or off by app. These run on every request from T3 Code. We measured them on Claude Code (and some on Codex), not in T3 Code, so this page gives no numbers for T3 Code.

Feature

Saving Memory Skills Instructions Recall Protect

Your Codex in T3 Code runs the test suite. The log is long.

```
$ npm test
# the full log goes to your archive
# the model reads the failing test, not every passing line
```

Large tool output stays out of the model's context, and the agent can ask for the rest. Works on every request. Measured on Claude Code only.

You tell Claude Code in T3 Code a rule once. Next week, in a new session, it still knows.

```
deploy target? Render, not Hetzner (remembered)
```

T3 Code turns are stored as Claude Code or Codex turns, in the same store as those agents use in your terminal.

You import your skills from GitHub once, in the console. In T3 Code, the right one loads when your message fits it.

```
> break this plan into tickets
context-mode · skill to-tickets auto-loaded
```

Nothing to install on each machine. The skill runs from the gateway, on every request.

You write one text in Settings, for example "Answer in short sentences". Both agents in T3 Code follow it.

```
# console → Settings → Instructions
Answer in short sentences. Never push without asking me.
```

Sent on every request. It changes how the agent writes, not what it can do.

A session runs all day. Old work moves to the archive, and the agent finds it again with a search.

```
# the agent calls context-mode-search
"which flag did we use for the migration this morning?"
```

Recall and Active Context run on every request. The Recall live probe ran on Claude Code, not in T3 Code.

Protect rules are enforced when you run Claude Code or Codex in the terminal.

```
$ git push origin main
# in T3 Code: not verified
```

Nobody has run the proof through T3 Code yet. Until we have, do not count on Protect in T3 Code. Keep your agent's own sandbox on.

More on each: [Saving](https://contextmode.ai/docs/how-saving-works), [Memory](https://contextmode.ai/docs/memory), [Skills](https://contextmode.ai/docs/skills), [Instructions](https://contextmode.ai/docs/instructions), [Recall](https://contextmode.ai/docs/recall), [Protect](https://contextmode.ai/docs/protect).

## Memory for T3 Code

Memory needs no step in T3 Code. What you tell either agent (rules, decisions, preferences) is kept for later sessions, so you do not repeat yourself. Long history is archived, not lost, and the agent can ask for it back. T3 Code turns are stored as Claude Code or Codex turns, so they go to the same store as the turns you run in the terminal, on this machine and your others.

## How T3 Code shows in the console

One console holds all your agents. Codex turns from T3 Code send `originator: T3 Code`, so the console names them **T3 Code**. Claude Code turns from T3 Code show as **Claude Code**: we have not verified how they name themselves on the wire. Open the console at [console.contextmode.ai](https://console.contextmode.ai).

## How to undo it

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

This removes both entries, the Claude Code one and the Codex one, with a backup first. Everything else in the files stays.

## Say this plainly

- **Claude Code turns started from T3 Code show as Claude Code in the console.**
- Not verified: whether a Shadow home path reads `~/.codex/config.toml`, and whether the "⏺ contextmode" line shows in the T3 Code window.
- Protect is not verified through T3 Code. Session resume does not cover T3 Code.
- No savings number on this page applies to T3 Code. Our benchmarks ran on Claude Code.
- Context Mode is under the Elastic License 2.0 (ELv2).

## The other apps

T3 Code is one of seven apps that one command connects: Claude Code, Claude Desktop, Codex, Codex Desktop, T3 Code, OpenCode and Pi. Read the overview in [seven coding agents, one gateway](https://contextmode.ai/blog/seven-coding-agents-one-gateway), or the posts on [Claude Desktop](https://contextmode.ai/blog/claude-desktop-context-mode) and [the ChatGPT desktop app](https://contextmode.ai/blog/codex-desktop-context-mode).

## Start

Install T3 Code its own way, then run one command. [Open the Console](https://console.context-mode.com/login) to see your workspace.

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

- Console: [https://console.contextmode.ai](https://console.contextmode.ai) ([start free](https://console.context-mode.com/login))
- CLI: `npx @context-mode/cli`
- Docs: [Quick start](https://contextmode.ai/docs/quick-start) and [CLI](https://contextmode.ai/docs/cli)

[Get started free](https://console.context-mode.com/login) [All posts](https://contextmode.ai/blog)
