Search · every session from Claude Code and Codex

# Find last week's fix *from any machine, in a browser.*

**The gateway saves each turn of your Claude Code and Codex sessions as it passes, and you search them in the console from any machine.** Your agent searches the same store and reads archived tool output back byte for byte, with secrets and e-mail addresses masked.

2 clients in one history

0 files to copy between machines

5 MB read back identical in tests

[Connect your agent →](https://context-mode.com/docs/quick-start) [Read the docs](https://context-mode.com/docs/search)

## Key facts

What it is

A Context Mode Gateway feature: one searchable history of prompts, commands and tool output.

Who it is for

Developers who need last week's fix, command or output, from any machine.

Clients

Claude Code and Codex, in one history. Search covers archived tool output, and search over past prompts comes with Memory.

Measured result

Not a cost feature, and not measured on its own. For the gateway as a whole, see [Benchmarks](https://context-mode.com/docs/benchmarks#pooled).

Limits

The console searches the first 4,000 characters of each tool result; the agent can read the full output.

For people

### Search in the console

Next to Sessions in the sidebar at console.context-mode.com.

## Type a word *and get the exchange it came from.*

Each hit shows your message and the reply, with project, date and your words marked. Click it to read the turns around it, or open the session again with [Session resume](https://context-mode.com/session-resume).

matches your messages, the replies, the commands the agent ran, the first 4,000 characters of each tool result

covers every project and worktree in your account, the top 50 matching turns each

access one store per account, and only your account can read it

For the agent

### context-mode-search

The gateway adds this tool and answers it itself.

## The agent reads back what the gateway shortened, *byte for byte.*

One exception, for safety: secrets and e-mail addresses are masked before the output is stored.

When [Context Saving](https://context-mode.com/context-saving) folds a test run, a label with an archive id stays in the prompt. The agent passes that id to `context-mode-search` and pages through the stored output. It never runs the command again.

Why it pays

Folding is safe because nothing is gone. On an npm test fix-and-rerun loop, the gateway folded the test output and the run cost **22% less on Claude Opus 5.5 (16 to 28%)** over 16 paired runs, with no change in task success.

Compared

## Where your history lives.

Claude Code A JSONL file per session under `~/.claude/projects`, on the machine that ran it.

Codex A rollout file under `~/.codex/sessions`, on the machine that ran it.

claude-mem and similar An index in a database on your own machine.

Context Mode At the gateway, per account. One browser search covers every machine and both clients, and the agent reads the same archive.

Paired runs on Claude Opus 5.5, 2026-09-29. [Every benchmark, with its method →](https://context-mode.com/docs/benchmarks#test-debugging)

## FAQ

### Do I need to copy session files between machines?

No. The history is kept at the gateway, so every connected machine sees it.

### Can I find an old Claude Code conversation?

Yes, if it went through the gateway. Type a word and you get the exchange it came from.

### Is anything masked?

Yes. Secrets and e-mail addresses are masked before storage.

## Every session, *one search.*

*npx @context-mode/cli* points Claude Code and Codex at the gateway. Every turn is searchable from then on.

[Connect your agent →](https://context-mode.com/docs/quick-start) [How search works →](https://context-mode.com/docs/search)
