Use case
We fixed this bug last week. Which session was it? Find it in one search.
Context Mode saves each prompt, command and tool output as it passes, from every machine and both clients. You search it in the console. Your agent searches it too and reads old output back in full.
We fixed the staging deploy last week. How?
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
Two folders per laptop. The fix from your other machine is not there.
We fixed the staging deploy last week. How?
Search: staging deploy last week · web “The staging deploy fails. Can you fix it?” last week · web $ ./scripts/deploy.sh --env=staging
Every workspace, every machine, both clients. Click a hit to read the turns around it.
Your agent searches before it asks you.
context-mode-search {"q":"deploy staging"}
// best matches first,
// each with a short snippetThe tool tells it to search before it runs a command again only to see an old result.
A snippet is not enough. The agent reads it all.
context-mode-search {
"q":"full output",
"docid":"…-184320",
"offset":0}The whole old output, page by page, as it was stored.
The old output had author e-mails in it.
$ git log -2 Author: dev <[redacted-email]> Author: ops <[redacted-email]>
Masked before storage. Known secret formats become [redacted-secret], and e-mail addresses become [redacted-email].
The fix is somewhere. Not where you look.
Claude Code keeps a JSONL file per session under ~/.claude/projects. Codex keeps its own files under ~/.codex/sessions. Each on the machine that ran it.
You know it was "staging" and "deploy". You do not know which session, which project or which day.
Without the old output, your agent runs the same command again to see a result it already had.
Saved as you work. Found when you need it.
- 01Work as usual
The gateway saves each turn as it passes: your messages, each tool call with its full input, and tool results. Before storage, it masks known secret formats and e-mail addresses.
- 02Type a word
Open Search in the console. You get each matching exchange with its project and date, from every workspace in your account.
- 03Your agent reads it back
The agent calls
context-mode-searchwith words, or with a docid to read the archived output byte for byte, one page at a time.
Search over past prompts needs Memory on. Tool output stays searchable with Memory off. The console searches the first 4,000 characters of each tool result; your agent can read the full output.
Read back as stored. Secrets left out.
From the Search docs. Search is not a cost feature and is not measured on its own; for the gateway as a whole, see the benchmarks. How output is stored →
One search. Not one folder per laptop.
| History | Context Mode | Local files |
|---|---|---|
| Where it is | The gateway, per account | ~/.claude/projects or ~/.codex/sessions, on one machine |
| What you search | Every machine and both clients | One machine, one client |
| How you find it | You search in the console, and your agent searches with a tool | You pick a session with claude --resume or open one with codex resume |
Sessions from before you connect the gateway are not in the store. The full comparison →
What this uses.
Every prompt, command and tool output, from every agent and machine, in one search.
What is saved, the tool's fields, how large output is stored, and the limits.
Found the session? Open it again in your terminal on any machine.
An all-day session, long sessions and Context Mode for developers.
Every session, one search. Starting today.
npx @context-mode/cli connects your agents. 1,000 requests free, no card.