Guide

Resume an agent session anywhere

Native claude --resume only works on one machine, only opens Claude Code, and silently deletes local transcripts after 30 days by default. Atuin Threads beats native resume: it is MIT open source, end-to-end encrypted, and free offline or with personal sync, capturing sessions across 11 coding agents into local SQLite. Turn on capture and sync on both machines, then run atuin resume to pick up where you left off on another computer, fork any session, or move a Claude Code conversation into Codex or opencode.

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

To resume an AI agent session on a different machine where you left off, enable Atuin Threads capture and sync on both machines, pull your git branch, and run atuin resume. Atuin decrypts the synced thread, restores or catches up the agent's native transcript on disk, and opens the agent right where you stopped — across 11 coding agents and past Claude Code's 30-day cleanup.

See why coding agents lose context between machines for where each agent stores its local files, or our 2026 comparison of agent session tools.

In short
  1. 01

    Run atuin setup to turn on Threads capture, optional end-to-end encrypted sync, and MCP (requires Atuin 18.24+).

  2. 02

    Run atuin threads import to bring in existing sessions already on this machine.

  3. 03

    Run atuin resume to pick up on another machine, fork a session without changing the original, or continue it in another agent.

  4. 04

    Or ask your agent directly over MCP to search earlier sessions without resuming them.

Which workflow do you need?

Pick the command that matches what you are trying to do.

Goal to action
Goal With Atuin Threads Native agent CLI
Resume on another machine Enable sync on both machines, pull git, then run atuin resume. Atuin restores or catches up the native transcript automatically. Not built in for local transcripts; requires SSH, tmux, or manual file copying.
Resume Codex on another computer Run atuin resume (or atuin resume <id>) on the second computer. Restores the rollout JSONL automatically. Manual mkdir + scp of ~/.codex/sessions/.../rollout-*.jsonl.
Move Claude Code into Codex or opencode Run atuin resume <id> --in codex (or --in opencode), or pick it under "Continue in". Tool calls map over. Not supported; transcripts are harness-specific.
Fork a Claude Code session safely Run atuin resume <id> --fork or pick fork in the picker. Works across 10 agents and synced machines. claude --resume <id> --fork-session works locally only, within 30 days.
Recover a 30+ day old Claude session Run atuin resume. Atuin rewrites the deleted transcript from its own database before opening Claude Code. Deleted after 30 days by default (cleanupPeriodDays).
Ask an agent what a past session found Enable MCP in atuin setup and ask your agent directly; it queries atuin_threads_search. Requires pasting summaries or manually reading old logs.

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 end-to-end encrypted, and writes it back out as a native session the agent on the other end can open.

Looking through your 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.

Atuin Threads vs native session resume
Capability Atuin Threads (atuin resume) Claude Code (claude --resume) Codex CLI (codex resume) VS Code Agent Sessions
Price & license $0 / MIT open source (free offline, free personal Atuin Cloud sync, self-hostable sync server) Included with Claude Code CLI Included with Codex CLI Included with VS Code
Agents covered 11 coding agents (10 with full restore, fork and continue-in; Amp capture and continue-out) 1 (Claude Code only) 1 (Codex CLI only) VS Code chat and agent sessions
Cross-machine resume ✓End-to-end encrypted sync; restores or catches up native transcripts offline or online —Local disk only (~/.claude/projects/) —Local disk only (~/.codex/sessions/); requires SSH or manual scp Remote SSH or cloud hosts while connected; no standalone CLI sync
Retention & limits No automatic expiry (~64 KiB cap per large tool payload); requires Atuin 18.24+ Deleted after 30 days by default (cleanupPeriodDays, min 1 day) No automatic expiry; kept locally until deleted or archived Tied to VS Code workspace and host storage
Cross-agent handoff ✓--in codex, --in opencode, etc. (maps tool calls; drops reasoning) —No —No —No CLI transcript conversion
Session forking ✓Uniform --fork across all 10 local agents, same or another machine (not Amp) ✓--fork-session / /fork (local machine only) ✓Local machine only Workspace-bound
Search & picker startup Reads local indexed SQLite sidecar directly without waiting for the daemon; full-text across all 11 agents Scans local per-project JSONL files for Claude Code Reads local ~/.codex/sessions/ and state_5.sqlite for Codex Chat view and Agents window in VS Code UI

Primary sources: Claude Code sessions docs, Claude Code settings docs, OpenAI Codex CLI, VS Code Manage Agent Sessions, Atuin Threads docs, and atuinsh/atuin.

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 walks you through turning on Threads capture, the Atuin daemon, MCP, and optional sync. Already installed Atuin? Run atuin setup anytime to turn them on.

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

    The installer runs atuin setup, which walks you through turning on Threads capture, MCP and optional sync.

    install.sh
    curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh
  2. 02 Already installed? Run setup

    Turn on Threads capture, sync or MCP for every installed agent in one interactive prompt.

    sh
    atuin setup
  3. 03 Import existing threads

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

    sh
    atuin threads import

Resume an AI agent session on another machine

To resume an AI agent session on a different machine where you left off, pull your git branch on the second machine and run atuin resume (or atuin resume <session-id>) with Atuin Threads capture and sync enabled on both hosts. If the transcript is not on this machine, Atuin writes the native transcript back out from your end-to-end encrypted synced database before launching the agent; if an older local copy already exists, Atuin catches it up with the new messages from sync first.

atuin resume opens a searchable 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. Full details are in the Threads docs and the Atuin Threads announcement post.

Resume a Codex CLI session on another computer

To resume a Codex CLI session on a different computer, enable Atuin Threads capture and sync on both machines, pull your git branch on the second computer, and run atuin resume (or atuin resume <session-id>) to pick the Codex thread. Atuin restores the synced Codex rollout transcript to disk automatically and launches Codex right where you left off — no manual scp required.

Natively, Codex CLI saves transcripts locally under ~/.codex/sessions/YYYY/MM/DD/rollout-*.jsonl (indexed by state_5.sqlite), so codex resume and /resume only see sessions on the current machine. Copying one JSONL file over scp works for a one-off transfer, but breaks once you switch back and forth between desktop and laptop or risk corrupting state_5.sqlite with folder-sync tools. With Atuin Threads, switching back appends only the new synced messages cleanly — and if you prefer another harness on the second computer, you can continue that Codex session in Claude Code or opencode instead.

laptop — resume Codex session
$ git pull
$ atuin resume 019b2813
atuin: restored the thread from sync
→ codex resume 019b2813-b881-7813-afe8-bf072950e53b

Move a Claude Code conversation into Codex or opencode

To move a Claude Code conversation into Codex or opencode without losing context, run atuin resume, pick the Claude Code session (ctrl-t filters to Claude Code), press enter, and choose Codex or opencode under "Continue in" — or run atuin resume <session-id> --in codex (or --in opencode) directly. Atuin writes a new native session for the target agent with the conversation and tool calls mapped over, leaving the original Claude Code session untouched.

This works on the same machine or across machines when sync is enabled on both. Native claude --resume, codex resume, and opencode cannot open each other's files because every harness writes a different schema (see where each agent keeps its sessions). On handoff, Atuin carries tool calls and their outputs over as the target agent's own shell, read, edit, and search calls where it has an equivalent, drops reasoning blocks, and opens the new session with a note naming the Claude Code session it continues.

The original Claude Code session stays intact, and you can still resume it in Claude Code later.

continue Claude Code in another agent
# Continue in Codex
$ atuin resume 5d02b9f4 --in codex
atuin: continuing in Codex
# Or continue in opencode
$ atuin resume 5d02b9f4 --in opencode
atuin: continuing in opencode

Fork a Claude Code session without losing the original

To fork a Claude Code session and try a different approach without losing the original, run atuin resume, press enter on the session, and pick fork — or run atuin resume <session-id> --fork directly. Atuin writes a brand-new Claude Code session with the same conversation history and opens it, leaving the original session untouched so you can resume it anytime.

Claude Code also supports native local forking with claude --resume <id> --fork-session (or claude --continue --fork-session; see the Claude Code sessions docs), but that only works on the same machine and only before the 30-day cleanupPeriodDays cleanup removes the file. Forking through atuin resume works the same way across all 10 locally stored agents, works on another synced machine, recovers expired transcripts first, and accepts --branch if a session diverged across hosts.

fork without changing the original
$ atuin resume 5d02b9f4 --fork
atuin: forked into a new Claude Code session
→ claude --resume 9a1e4c20-...
Original session 5d02b9f4 is left untouched.

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. Run atuin setup to connect it to every installed coding agent, 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 matrix

Atuin Threads captures, searches and resumes sessions across 11 coding-agent harnesses. Every agent below except Amp stores transcripts locally, so Atuin can restore them on another machine, fork them, and write sessions into them when continuing from another harness.

Per-agent capture, resume, fork and continue support
Agent Capture & search Native resume Cross-machine restore Fork Continue-in target Notes
Claude Code ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Subagent sessions are searchable but not directly resumable.
Codex ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Maps shell, read, edit and search tool calls on handoff.
opencode ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Supports both legacy storage and SQLite DB formats.
GitHub Copilot CLI ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Full capture, restore, fork and MCP install.
Grok Build ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Full capture, restore, fork and MCP install.
Hermes Agent ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Full capture, restore, fork and MCP install.
Kiro ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Full capture, restore, fork and MCP install.
Pi ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Restores parent transcript automatically when forking.
oh-my-pi (omp) ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Full capture, restore, fork and MCP install.
Mistral Vibe ✓Yes ✓Yes ✓Yes ✓Yes ✓Yes Local sessions only (Vibe Code Web stays on Mistral's servers).
Amp ✓Yes ✓Via Amp —Server-hosted —No —No Amp threads can be continued in other agents, not forked or used as a target.

Threads for teams (beta) shares threads with your organization, searchable on the web or over MCP.

Requirements and limits

Atuin Threads requires Atuin 18.24 or later, and capture is opt-in via atuin setup. Knowing the current limits up front avoids surprises when moving sessions across machines or harnesses.

See the Atuin Threads docs for full configuration options, or Atuin for agents for shell history and MCP tools.

Good to know
  1. 01

    Requires Atuin 18.24+ and opt-in capture

    Threads capture is off until you turn it on in atuin setup. Cross-machine resume also needs sync enabled on both hosts (Atuin Cloud or your own self-hosted server).

  2. 02

    Amp threads can be continued, not forked

    Because Amp stores sessions on its own servers, Atuin captures and searches Amp threads and can continue them in another agent, but cannot fork an Amp thread or write another agent's session into Amp.

  3. 03

    Subagents, payload size and reasoning

    Subagent sessions (such as Claude Code subagents) are searchable, not directly resumable (passing a subagent ID targets its parent session). Large individual tool payloads are clipped around 64 KiB on capture, and reasoning blocks are dropped on cross-agent handoff.

  4. 04

    Transcripts sync, git files don't

    Atuin syncs conversation transcripts, not uncommitted code changes — push and pull your git branch when switching machines. Mistral Vibe captures local sessions only (Vibe Code Web stays on Mistral's servers).

Frequently asked questions

FAQ
How do I resume an AI agent session on a different machine where I left off?

Run atuin setup on both machines to turn on Atuin Threads capture (requires Atuin 18.24+) and end-to-end encrypted sync (Atuin Cloud or a self-hosted server). On the second machine, pull your git branch and run atuin resume — Atuin restores or catches up the agent's native transcript automatically and opens it where you stopped.

How do I resume a Codex CLI session on a different computer?

Turn on Atuin Threads capture and sync on both computers, pull your git branch on the second computer, and run atuin resume (or atuin resume <session-id>) to select the Codex session. Atuin writes the synced Codex rollout transcript to disk automatically without manual scp of ~/.codex/sessions/ files.

How do I move a Claude Code conversation into Codex or OpenCode without losing context?

Run atuin resume, press enter on the Claude Code session, and choose Codex or opencode under "Continue in" — or run atuin resume <session-id> --in codex (or --in opencode). Atuin creates a new session in the target agent with the conversation and mapped tool calls, drops reasoning blocks, and leaves the original Claude Code session untouched.

How do I fork a Claude Code session to try a different approach without losing the original?

Run atuin resume, press enter on the session, and pick fork — or run atuin resume <session-id> --fork. Atuin creates a new Claude Code session with the same history and leaves the original intact. Unlike native claude --resume <id> --fork-session, this works across synced machines, across all 10 local agents (not Amp), and even after Claude Code's 30-day local cleanup.

Why use atuin resume instead of native claude --resume?

Native claude --resume only works on one machine, only opens Claude Code, and silently deletes local transcripts after 30 days by default (cleanupPeriodDays). atuin resume is MIT open source, end-to-end encrypted, free offline and free for personal sync, searches full conversations across 11 coding agents in local SQLite, resumes across machines, and hands sessions off between agents.

Why did my old Claude Code sessions disappear?

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

Can Atuin read my synced sessions?

No. Personal Threads sync works like shell history: end-to-end encrypted client-side before upload, so the server stores ciphertext it cannot read. You can also self-host the MIT-licensed sync server. Threads for teams is separate, and opt-in.

What are the requirements and limits of Atuin Threads?

Atuin Threads requires Atuin 18.24 or later and is opt-in via atuin setup. Amp threads can be captured, searched, and continued in other agents, but cannot be forked or targeted; subagent sessions resume their parent; large tool payloads are clipped around 64 KiB; and reasoning blocks are dropped on cross-agent handoff.