> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Move a live session to another machine

> Carry a running claude worker to another machine with its code, worktree, transcript and claims. The session keeps its name and nothing runs twice.

> After this page, you can carry one live claude session from this machine to another and it keeps working there under the same name. You can also preview any move before you run it, and move every live worker off a machine in one command.

`fno agents session move` carries a running claude session to another machine over ssh. The session keeps its name and its session id. A finished move leaves this machine with no running session and no registry row, so nothing runs twice.

A few words this page uses:

* **Session**: one agent's running or resumable context, with its transcript.
* **Harness**: the agent program that runs the session, such as claude, codex or opencode.
* **Row**: the session's line in this machine's **registry**, the list that `fno agents session list` reads.
* **Transcript**: the file that records everything the session did. `claude` keeps it under its projects directory. A sidecar directory of helper files and a small origin record sit beside it.
* **Claim**: the lock that says "this node builds here". A **node** is one item of work on the backlog board, the list `fno backlog list` prints.
* **Worktree**: the checkout the session works in.
* **Worker**: a session that builds nodes. **Lead**: a session that holds a role scope, a named set of projects it directs, and it directs workers.
* **Canon doc**: the handoff file a lead carries for its role scope.

This page moves one session at a time between your own machines. To point machines at one shared store instead, see [Run one fleet across machines](/docs/guides/multi-machine.md). To open another machine's terminal in your mux, fno's terminal multiplexer, see [Use one mux across your machines](/docs/guides/mux-remote-sessions.md). To revive a session that died, see [Recover a worker](/docs/guides/recover-a-worker.md).

## Before you start

* fno on both machines, from a build that carries `session move`. The v0.4.8rc2 release and earlier do not include it. A version line does not settle it: a source build can print an older version. Check the feature instead. Run `fno agents session move --help` on each machine. A build that carries the move prints a usage line. An older build answers `unknown command`. [Install](/docs/install.md) covers the release and source routes.
* Password-free ssh from this machine to the target. Check with `ssh <host> fno --version`, which prints the target's version line. The move never asks for a password.
* A claude daemon on the target, started from a login session there. fno calls a daemon started this way gui-born. To produce it, sit at the target's graphical login, open a terminal, and run claude once. Its daemon starts in that login. A daemon that an ssh session or a launchd job started loses DNS on resume. The move refuses a daemon born anywhere else, and a resume over ssh starts one in the wrong place. The dry run cannot catch this one, because it reads this machine only. The real run refuses before anything moves.
* The same absolute paths on both machines: the worktree path, and the path of the claude transcript directory. Byte-identical paths are the usual setup with the same username on both machines. No flag changes this. The move creates the worktree on the target at that path. The target path must hold nothing there, or already hold this branch at this commit. Anything else refuses.

## Preview the move

Add `--dry-run` to print the steps and move nothing. The preview reads this machine only:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move atlas --to desk-o5f --dry-run
```

Replace `atlas` with your session's name. Replace `desk-o5f` with the target's host name, such as the name `tailscale status` prints for it. Any name your ssh accepts works here, an alias from your ssh config included. `fno agents session list` prints one JSON object per row, and this page uses four of its fields:

```json theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  "name": "atlas",
  "harness": "claude",
  "harness_session_id": "<session-id>",
  "liveness": "alive"
}
```

Read the `name` for the command, and `liveness: "alive"` for a session that is running now. A row with a `role_scope` field is a lead. To put a session on this list, spawn it with `fno agents spawn` or let it join the mesh. [Run a fleet](/docs/guides/run-a-fleet.md) covers both.

The print names every step, in order, and stops there:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
dry run: move atlas (<session-id>) -> desk-o5f; nothing is moved
  1. preflight
  2. push commits
  3. stop source
  4. worktree sync
  5. transcript sync
  6. canon doc sync
  7. target row
  8. claims handover
  9. resume
  10. verify
  11. retire
```

`<session-id>` in the sample is the session's id, and the command fills it in. `fno agents session list` prints it under `harness_session_id`. The list shows 11 steps because `atlas` carries uncommitted changes. A clean tree drops `worktree sync`, for 10 steps.

## Move one session

Run the same command without `--dry-run`, from your own terminal on this machine. Do not run it from inside the session that is moving. The move stops that session, and the session takes its own terminal with it.

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move atlas --to desk-o5f
```

The move prints nothing while it works. Two lines arrive at the end:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
retired on laptop-o1: row and stopped session atlas
moved: atlas <session-id> -> desk-o5f
```

The `verify` step polls the target for up to 120 seconds before the last line. The other steps take as long as the push and the copies take, so the whole move grows with the repo and transcript sizes. The target must list the session live under the same name and id, and its transcript must be longer than the copy the move made. When you see `moved:`, the session is working on the target, its claim is gone here, and it no longer runs on this machine. The worktree and the transcript files stay on disk here, as a backup. Remove them after you check the target.

There is no undo command. To move the session back, run the same command on the target, with this machine's host name after `--to`.

To check it from the target:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
ssh desk-o5f fno agents session list
```

The list shows the row under the same name. This machine's list no longer shows it.

## Clean up this machine

The move left the worktree and the transcript files on disk here, as a backup. The row's `cwd` field in `fno agents session list` names the worktree path. When the target checks out, remove them:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
git worktree remove /Users/you/work/fno-web
```

The transcript files live under `~/.claude/projects/`, in the folder named for the project, with the session id in the file name. Remove that session's files by hand.

## What a move carries, and in what order

The order is the contract. The source stops before the move copies one byte of the transcript, so two writers never share one transcript. The source row leaves last, after the target proves it holds a live session.

| Step | What it does |
| - | - |
| `preflight` | Checks the target: it answers ssh with fno installed, and its daemon is gui-born. Also checks the paths. |
| `push commits` | Pushes the branch straight to the target's git directory over ssh. No GitHub, no remote needed. |
| `stop source` | Stops the session on this machine. |
| `worktree sync` | Only for a dirty tree. Copies the uncommitted files with rsync, without the `.git` directory and the `target/` build directory. |
| `transcript sync` | Copies the transcript, its sidecar directory, and the origin record to the same paths. |
| `canon doc sync` | Copies a lead's handoff file. Nothing to copy for a worker. A moved lead resumes on the target and keeps its scope. Only `--all` hands a lead off. |
| `target row` | Registers the session on the target under the same name. |
| `claims handover` | The target takes each `node:` claim the session held. |
| `resume` | The target resumes the session and sends it one message: it continues its work there. |
| `verify` | Polls the target for up to 120 seconds for a live row and a longer transcript. |
| `retire` | Removes the source row and the stopped session on this machine. |

The claims handover keeps the claim's holder string, so a node that was building on this machine keeps building, now on the target. The claim note records the move: it says which machine the claim came from.

## Move every session off the machine

Add `--all` to move every live claude worker on this machine, one at a time:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move --all --to desk-o5f
```

`--all` sorts this machine's rows into three piles. Live workers move in registry order. A live lead session does not resume on the target. The move carries its canon doc, then prints the command for its successor, the session that takes the lead's scope on the target. The move skips every other row, and prints the reason. The first failure stops the run, and the last line names the workers it did not move:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move --all: atlas failed; not moved: blip, cargo
```

Preview the piles with `--all --dry-run`:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
dry run: move this host's live claude sessions -> desk-o5f; nothing is moved
  move atlas
  move blip
  carry canon doc for lead-1 (scope fno); no resume
  hand off: on desk-o5f, a person runs: fno agents hq promote <handle> --scope fno
  skip pilot: opencode is not built yet
  skip resting: not live
```

Replace `<handle>` with the successor's agent name on the target. The excerpt shows one line per pile. The real list names every row.

To take a machine out of service, run `--all` on it first. If the machine also holds claims you want elsewhere, read [Run one fleet across machines](/docs/guides/multi-machine.md).

## Recover from a failed `verify` step

A failed `verify` step leaves the source stopped, with its row still in place. The move exits 1 and prints the resume command. To find the cause, look at the target. Run `ssh desk-o5f fno agents session list` to see whether the row landed. The daemon bullet above names the check that fails most often.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
the source is stopped and its row stays; resume it here with: fno agents session resume atlas
```

Run that command. The session resumes here. Then fix the cause on the target, and run the move again.

## Refusals and fixes

A refusal prints one line and exits 2. It happens before any step touches either machine.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move: --to desk-o5f is this host; name another machine
```

The target name, with any domain and `.local` trimmed, matches this machine. Name the other machine.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move: no session named atlas in this host's registry
```

No row carries that name here. Run `fno agents session list` to read the names.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move: atlas runs opencode; codex and opencode moves are not built yet, the manual recipe: docs/architecture/session-move.md#manual-recipe
```

The move carries claude sessions only. The by-hand recipe at the end of this page moves any other harness.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move: cannot reach desk-o5f over ssh with fno installed: ssh: Could not resolve hostname desk-o5f
```

The target did not answer `ssh` with `fno --version`. Fix the name, the ssh keys, or install fno there.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move: the claude daemon on desk-o5f is not gui-born (born inside an ssh session); start it from a login session there, then retry
```

The claude daemon on the target was born in an ssh session or a launchd job, not in a login session. Run claude on the target in a normal login session there, so its daemon starts in the right place, then run the move again.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move: /Users/you/work/fno-web has a character the move cannot pass to ssh; rename it, then retry
```

A path the move must copy holds a character outside letters, digits, and `/ . _ - + @ ,`. Rename the directory, or move the session by hand.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move: desk-o5f:/Users/you/work/fno-web already holds branch "docs/x", not this session's; remove it there, then retry
```

The target path holds a worktree on another branch, or on this branch at an older commit. Remove or rename that worktree on the target, then retry.

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session move: desk-o5f:/Users/you/.claude/projects/<project>/<session-id>.jsonl is newer than the source copy (target mtime 1793959200, source mtime 1793959041); the move stops before it overwrites newer work
```

The target already holds a newer transcript than this machine's. The move stops before it overwrites that work. Check which copy you want, remove the stale one, and retry. The two numbers are file times in seconds since the epoch. Yours will differ.

## Move a codex or opencode session by hand

The command moves claude sessions only. The refusal above names a developer document for the by-hand route. That recipe is here. For any other harness, run these steps once, in this order:

1. Push the branch from the worktree.
2. Stop the session: `fno agents session stop <name>`.
3. Copy the worktree to the same path on the target.
4. Copy the transcript. Run `fno agents registry transcript send <session-id>` here, and `fno agents registry transcript receive '<code>'` on the target. The send prints the code.
5. On the target, run `fno agents registry adopt <session-id>`, then `fno agents registry rename cc-<short-id> <name>`. `<short-id>` is the first eight characters of the session id.
6. On the target, run `fno agents session resume <name>`.

## Next steps

* [Run one fleet across machines](/docs/guides/multi-machine.md): share one store, so one backlog board covers every machine.
* [Use one mux across your machines](/docs/guides/mux-remote-sessions.md): open the moved session's terminal in your mux and type to it.
* [Recover a worker](/docs/guides/recover-a-worker.md): revive a session whose machine died, instead of moving it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.