# Threads

_Atuin threads_ is Atuin's way of capturing, resuming and sharing your AI agent
sessions across any machine. With Atuin threads, you can start a thread on one
machine, SSH into another machine, and continue your thread where you left off,
even in another harness.

TODO CLAUDE VHS HERE

## Resuming threads

You can list out all your threads by running `atuin threads list`.

<VHSTape title="atuin threads list shows the captured threads, newest first.">
  Set FontSize 20
  Set Height 400
  Env ATUIN_DAEMON__ENABLED "true"
  Env ATUIN_DAEMON__AUTOSTART "true"
  Env ATUIN_THREADS__CAPTURE "true"
  Hide
  Type ` source "$ZDOTDIR/world.zsh" && clear`
  Enter
  Sleep 2s
  Show
  Type "atuin threads list"
  Sleep 500ms
  Enter
  Sleep 3s
</VHSTape>

`atuin threads search '<search-string>'` enables you to find a thread by
keyword.

<VHSTape title="atuin threads search finds the thread whose messages mention upload batches.">
  Set FontSize 20
  Set Height 400
  Env ATUIN_DAEMON__ENABLED "true"
  Env ATUIN_DAEMON__AUTOSTART "true"
  Env ATUIN_THREADS__CAPTURE "true"
  Hide
  Type ` source "$ZDOTDIR/world.zsh" && clear`
  Enter
  Sleep 2s
  Show
  Type "atuin threads search upload batches"
  Sleep 500ms
  Enter
  Sleep 3s
</VHSTape>

`atuin threads resume` opens a TUI which allows you to resume a thread. You can
even resume a thread in another harness.

<VHSTape title="atuin resume finds the Claude Code thread about the flaky sync test, and offers to continue it in Codex.">
  Set FontSize 20
  Set Height 600
  Env ATUIN_DAEMON__ENABLED "true"
  Env ATUIN_DAEMON__AUTOSTART "true"
  Env ATUIN_THREADS__CAPTURE "true"
  Hide
  Type ` source "$ZDOTDIR/world.zsh" && clear`
  Enter
  Sleep 2s
  # Stand-ins for Claude Code's and Codex's programs, on a PATH of just them, Atuin and the
  # system's tools, so the agents of the machine running the build stay out of the list.
  Type ` mkdir ~/agents && touch ~/agents/claude ~/agents/codex && chmod +x ~/agents/* && export PATH="$HOME/agents:$commands[atuin]:h:/usr/bin:/bin" && clear`
  Enter
  Sleep 1s
  Show
  Type "atuin resume"
  Sleep 500ms
  Enter
  Sleep 2s
  Type "flaky"
  Sleep 1.5s
  Enter
  Sleep 1.5s
  Down@600ms 2
  Sleep 2s
  Screenshot
  # Picking it would print the build machine's own directory, as the thread's isn't on it.
  Escape
  Sleep 300ms
  Escape
  Sleep 500ms
</VHSTape>

## Threads on Atuin Hub

:::note

Threads on the web requires you use [Atuin Hub](/hub/). For more info, on
setting up Atuin Hub, see [Atuin Hub](/hub/).

:::

By visiting https://atuin.sh/threads, you will see a list of all your threads.
This page allows you to see every thread you connected with the Hub. You can
view any thread, and search through all your threads.

TODO CLAUDE SCREENSHOT HERE

For more information on Threads on Atuin Hub, see [the Hub docs](/hub/threads/).