Finding the session where you solved it

search by the token you remember, not the topic you half-remember

You fixed it. You remember the error, roughly. You do not remember whether it was Claude Code or Codex, which project it was under, or whether it was three weeks or three months ago — and the harness's own history list is a wall of titles, in one tool, in reverse order. Nothing on the machine lets you search chat history across all of them at once.

Search by the most specific thing you remember

Not the topic — the token. An exact error string, a function name, a file path, a flag. Those survive in a transcript verbatim, and they are what separates the session you want from forty-one that discuss the same subject:

$ deja "refresh token"
[claude] api   · Jul 8 · 8f31c0a9 — 2 matches
  login started failing after refresh token rotation; jwt kid mismatch in tests
  fixed by reloading jwks cache after rotateKey and adding a clock-skew test
[codex]  web   · Jul 1 · b77d91e2 — 1 match
  refresh token cookie needed SameSite=Lax in local callback flow

Several words are ANDed, quotes require the exact phrase, and when nothing matches exactly the search falls back to word forms and close spellings rather than returning nothing. The harness column matters more than it looks: the session you want is often in the tool you were not thinking of.

Or search as you type

Bare deja in a terminal opens the same search as a full screen. Results update with each letter, the agent chips along the top count the hits per agent, and a narrows to one. tab moves between this project, all projects and Deleted, the sessions whose agent has since deleted them. The box also takes filters as words: codex: for one agent, today, yesterday, week or month, and in:api for one project. A search that finds nothing here names the other projects that have it, or offers the spelling your history uses. Open a session and / finds a word inside it, ] and [ jump between the turns you asked. When the box is empty, ↑ brings back what you searched before.

Narrowing without guessing

  • --harness claude, --project api-gateway — when you are sure, and only then.
  • --since 30d — a hard filter. A date inside the query is the softer version: it weighs recent sessions up without hiding older ones, because "I think it was in spring" is a hint and should not throw away the answer if it was April.
  • --role user — search only what you typed, which is a good filter when you remember your own words but not the answer.
  • deja last 20 --project api — no query at all, just the recent sessions in one project.

Reading it, then continuing it

A hit gives you a session id. Two things to do with it:

deja show 8f31c0a9      # read the session
deja ctx  8f31c0a9      # a Markdown digest to paste into whatever you are doing now
deja resume 8f31c0a9    # reopen it in the agent that ran it

resume hands the id back to the harness that owns the session, with the project directory where that harness scopes its list to one. It works for thirty-five of the forty-one harnesses deja reads. The remaining six — aider, Cherry Studio, DeepSeek Harness, JetBrains AI Assistant, VS Code Copilot Chat and Zed — have no resume path deja prints, and deja says so rather than pretending. Roo Code is half of each: tasks its CLI created take roo --session-id, and tasks from the editor reopen in the editor. Reasonix resumes what its CLI started in a workspace; sessions from its desktop app reopen from the app.

Ids are matched by prefix, so the eight characters a result prints are enough to type. On the screen there is nothing to type: ↵ opens the session at the match, r resumes it in its agent, and o continues it in a different one.

When the answer is a command rather than a session

Often what you actually want is not the conversation but one line out of it:

deja how "docker compose up"    # the invocation this project really uses
deja fix "pq: too many connections"   # what was run after that error, where it stayed fixed
deja blame path/to/file.go      # which sessions decided what about this file

Those skip the reading step entirely.

Where the transcripts live · How search and ranking work · When the session was in another agent

Found this useful? Star deja-vu on GitHub.