Guide

Resume an agent session anywhere

Atuin Threads captures your coding-agent sessions and syncs them end-to-end encrypted. Run atuin resume to pick one up on another machine, or carry a Claude Code session into Codex.

install.sh
curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
atuin resume — laptop
Fix the flaky migration test
● 2h ago · CC · api · main · 42 msgs
> 1 Claude Code resume
2 Claude Code fork: new session, same history
Continue in ─────────────────────
3 Codex
4 opencode

TL;DR

atuin resume is a faster, searchable picker over every session from every agent. It keeps sessions past Claude Code's 30-day cleanup, and resumes them on another machine or in another agent.

In short
  1. 01

    Turn on capture with atuin setup --only --threads --daemon. Capture is opt-in.

  2. 02

    Run atuin resume to pick a session, then resume it, fork it, or continue it in another agent.

  3. 03

    Turn on sync, hosted or self-hosted, to see sessions from your other machines.

  4. 04

    Run atuin setup --only --mcp so agents can search earlier sessions without resuming them.

Native resume vs Atuin Threads

Each agent has its own resume command: claude --resume (or claude --continue for the most recent) in Claude Code, and codex resume in Codex. Both read session files that the agent keeps on this machine, and only its own.

Atuin Threads goes further. Say you started an investigation in Claude Code on your desktop, and want to carry on in Codex from your laptop. Atuin captures the session as a thread, syncs it, and writes it back out as a session the agent on the other end can open.

Looking through your Claude Code session history can mean two things: carrying the work on, or finding something you figured out before. Resuming continues the session in an agent. Searching, over MCP, lets an agent read what an earlier session found without continuing it.

Why use atuin resume on the same machine

Sessions don't expire. Claude Code deletes its local session transcripts after 30 days by default (cleanupPeriodDays). Atuin keeps its own copy of every thread it captured. When a transcript is gone, atuin resume writes it back out before Claude Code opens it.

Faster. The picker reads Atuin's indexed threads database directly, so it opens quickly and results update as you type, however many sessions you have.

Search the whole conversation. The picker searches every prompt and reply, ranks threads by relevance, and opens the reader at the message that matched.

Easier to filter. ctrl-r narrows the list to this repository, branch, directory or machine, and ctrl-t to one agent. Type m:opus or b:main to filter by model or branch.

Every agent in one list. Claude Code, Codex, opencode and the rest share one picker, so you don't have to remember which agent you asked.

Set up Atuin Threads

Threads needs Atuin 18.24 or later. The installer runs atuin setup, which asks what to capture. To turn thread capture on later, or on its own, run the command in step 2. It also turns on the Atuin daemon, which does the capturing.

Captured threads go into Atuin's encrypted record store. Sync them with Atuin's hosted server, with your own server, or keep them on this machine. To resume a session on another machine, turn on sync on both.

  1. 01 Install or update Atuin

    install.sh
    curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
  2. 02 Capture your agents' sessions

    sh
    atuin setup --only --threads --daemon
  3. 03 Sync them between machines

    Or pass your own server's address instead of cloud. Skip this to keep threads local.

    sh
    atuin setup --sync cloud
  4. 04 Bring in sessions from before

    Capture starts when you turn it on. This imports what your agents already have on this machine.

    sh
    atuin threads import

Find and resume a session with atuin resume

atuin resume opens a picker over your threads. Type to search. ctrl-r narrows it to this workspace, host, directory or branch, and ctrl-t to one agent. ctrl-o opens a thread to read it.

Press enter on a thread and Atuin asks where to resume it. The session's own agent comes first, so enter enter resumes it as it was. Below that, fork starts a new session of the same agent with the same history, and leaves the original alone. Under "Continue in" are the other agents installed on this machine.

If the session was recorded on another machine, Atuin writes the transcript back out from the synced copy before the agent opens it. Full details are in the Threads docs.

Hand a Claude Code session to Codex on another machine

With capture and sync on both machines, start in Claude Code on the first. On the second, run atuin resume, find the session (ctrl-t filters to Claude Code), press enter, and pick Codex under "Continue in".

Codex opens a new session holding the conversation so far. Tool calls carry over with what they returned, as Codex's own shell, read, edit and search calls where it has one that does the same, so Codex sees what Claude ran and what came back. Reasoning is dropped. The new session opens with a note naming the Claude Code session it continues.

The original Claude Code session is untouched, and you can still resume it in Claude Code later.

Search past sessions over MCP instead

Sometimes you don't want to continue an old session, you just want what it found. Atuin's MCP server lets your agents search your threads and shell history. Connect every agent setup finds with atuin setup --only --mcp, or name one with --agents claude-code or --agents codex, then restart the agent and ask it something like:

"Find my earlier investigation into the Tigris avatar errors. What did I learn, and what was still open?"

The agent searches your threads, reads the relevant ones and answers. Your current session carries on; nothing is resumed.

Supported agents

Atuin Threads captures and resumes sessions from Claude Code, Codex, GitHub Copilot CLI, Grok Build, Hermes Agent, Kiro, opencode, Pi, oh-my-pi and Amp. Amp keeps its threads on its own servers, so they can be continued in another agent but not forked, and other agents' sessions can't be continued in Amp.

Threads for teams, in beta, shares threads with your team, searchable on the web or over MCP.

Frequently asked questions

FAQ
How do I resume a Claude Code session?

claude --resume picks a session and claude --continue reopens the most recent, on the machine it ran on. With Atuin Threads, atuin resume searches the whole conversation, resumes it on another machine or in another agent, and still has it after Claude Code's 30-day cleanup.

Why did my old Claude Code sessions disappear?

Claude Code deletes its local session transcripts after 30 days, unless you raise cleanupPeriodDays in its settings. Threads Atuin captured are kept, and atuin resume writes a deleted transcript back out when you resume it.

How do I resume a Codex session?

On the same machine, codex resume. From another machine, or to continue a Codex session in Claude Code or another agent, use atuin resume.

Can I continue a Claude Code session in Codex?

Yes. Run atuin resume, press enter on the session, and pick Codex under "Continue in". Codex gets a new session with the conversation and tool calls so far. The Claude Code session is left as it was.

Do I need sync to resume a session?

Only on another machine. Without sync, atuin resume still lists, forks and continues this machine's sessions in other agents.

Can Atuin read my synced sessions?

No. Threads sync like your shell history: end-to-end encrypted, so the server stores ciphertext it cannot read. Threads for teams is separate, and opt-in.

Does an agent need to resume a session to use what it found?

No. Over MCP, an agent can search and read your earlier threads from its current session.