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

# Recover a worker

> Inspect a quiet worker, attach to it, resume it, stop it, or remove it.

A quiet worker can be waiting for CI, a review, provider capacity or your input. Read its state before you start a replacement. A second worker does not remove the cause, and it can duplicate the work.

After this page, you can bring a stopped worker back with its session and its files. You can also end a worker correctly.

## Before you begin

Install F\[no] through the [quickstart](/docs/quickstart.md). Use the `t-docs-example` worker from [Run a fleet](/docs/guides/run-a-fleet.md), or a worker that you own. Do not stop other workers to test these steps.

The [CLI reference](/docs/reference/cli.md#session-recovery) lists the commands.

## Inspect first

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Inspect worker t-docs-example and its recent transcript. Recommend a next step without changing its state.
```

Your agent lists sessions and reads the transcript without changing the worker. You see its progress and next step.

### What the agent runs

Run these two commands in a terminal. Neither of them changes the worker.

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session list
fno agents session peek t-docs-example --lines 5
```

Use the row and the transcript to choose the next step:

| What you see | What it means | What to do |
| - | - | - |
| `progress` is `advancing` | The worker is taking turns. | Wait. |
| `progress` is `awaiting-operator` | The worker needs you. | [Attach](#attach-to-a-live-worker) and answer it. |
| `progress` is `refused` | A check refused the worker. | Read the refusal in the transcript, and fix its cause. |
| `status` is `orphaned`, and `reachability` is `unreachable` | The session has stopped. | [Resume it](#resume-a-stopped-worker). |
| The transcript names a pending check | The worker waits for CI or a review. | Read [Review and ship](/docs/guides/review-and-ship.md). |
| A target stopped before its PR | The target loop ended. | Read [a target stopped](/docs/troubleshooting.md#a-target-stopped-before-its-pr). |

## Attach to a live worker

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Attach me to the live worker t-docs-example.
```

Your agent attaches to the live worker. Its session opens so you can type to it.

### What the agent runs

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session attach t-docs-example
```

This opens the worker so that you can type to it. [Run a fleet](/docs/guides/run-a-fleet.md#attach-to-the-worker) explains what you see and how to leave.

## Resume a stopped worker

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Resume the stopped worker t-docs-example. Keep its existing session and worktree, then confirm it is reachable.
```

Your agent resumes the stopped worker and checks reachability. You see the same session ID and preserved files.

### What the agent runs

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session resume t-docs-example
```

Resume keeps the session ID and the worker's files. This is real output, with the session ID masked:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents resume: t-docs-example is a thread worker whose job socket is down - re-seating it on the thread substrate (claude respawn, same session id)
respawned <SHORT_ID>
t-docs-example is live again under <SESSION_ID> (same session id).
`fno agents attach t-docs-example` to drop in.
```

To check the result, run `fno agents session list`. The row reads `reachable` again.

The older spelling `fno agents attach` still works. The new spelling is `fno agents session attach`.

| Exit code | What it means | What to do |
| - | - | - |
| `0` | The worker is back. | Send your next message. |
| `13` | F\[no] refused. The error names the reason. | Fix the reason. |
| `16` | No live process, and F\[no] could not relaunch it. | Run the relaunch command that the error prints. |

> **Warning:** Do not delete a worktree or overwrite its files to make resume work. Save unfinished changes first. If you delete them, you lose the worker's commits.

## Stop a worker

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Stop worker t-docs-example and report its final status.
```

Your agent stops the worker and reports its final state. A pane worker refusal names the pane and registry actions.

### What the agent runs

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session stop t-docs-example
```

The command prints `stopped: t-docs-example (<SHORT_ID>)`. The row then reads `orphaned`.

Stopping a process does not complete its task. If the work is unfinished, keep its branch and worktree. A stopped worker can [still take mail](/docs/guides/message-agents.md#mail-can-wake-a-stopped-worker) on some harnesses.

`stop` refuses a `pane` worker. To end a `pane` worker, kill its pane, and then remove its row. The refusal prints both steps, with the older spelling `fno agents rm`:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno-agents: agent t-docs-pane is a pane worker; `stop` reaches no pane and would report a stop it did not perform. Kill the pane: `fno mux pane kill main:5471`. The registry row survives that; clear it with `fno agents rm t-docs-pane`.
```

## Remove a worker

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Remove the practice worker t-docs-example. Keep its transcript and report the result.
```

Your agent removes the practice worker and reports the result. The transcript stays on disk for recovery.

### What the agent runs

To clean up your practice worker, remove it:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session rm t-docs-example
```

A remove needs no stop first. The exception is a Claude Code background `thread` worker: run `fno agents session stop` on it, and then remove it.

This is real output, with the session ID masked:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
WARN: removing the claude session record for t-docs-example (<SESSION_ID>).
      The transcript stays on disk.
      Keep this full harness session UUID as the resume handle and recovery handle.
      Reverse it with: fno agents adopt <SESSION_ID>
removed: t-docs-example (fno + claude)
```

Remove deletes the worker record, not the transcript. To bring the worker back, run the `fno agents adopt` line. Save the session ID before you close the terminal.

`rm --force` also removes a live row. Do not use it on a worker that holds work you need.

## Understand automatic retirement

In F\[no] 0.4.6, the daemon retires quiet session rows by default. A retired row leaves the registry and the mux. Its transcript stays available. Retirement does not mean that its task succeeded.

The idle clock uses the transcript's last change. If no transcript age is available, it uses the last report or creation time. These windows apply before the sweep checks whether it can retire the row:

| Row | Idle window |
| - | - |
| A session whose named nodes are all done | At most 30 minutes |
| A spawned planning session | 20 minutes |
| Another spawned session | One hour |
| Another session that ran an F\[no] skill | 24 hours |

A completed promise or finished evaluation uses the retirement grace, which defaults to 15 minutes. A stopped session uses the same idle policy. A stopped session in the 24-hour category can retire after 24 quiet hours. Spawned sessions can retire sooner.

A keep mark, a lead role, a team, a live work claim, or an open PR the session drives can keep a row. A session you started yourself that never ran an F\[no] skill also stays. An unreadable graph or missing age can prevent retirement. The sweep reports the reason.

### Check why a row stays

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Check which session rows would retire without changing anything. Find the worker we discussed and explain its reason. Ask me which worker if unclear.
```

### What the agent runs

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents registry reap --dry-run
```

The report names each row and its reason. This command stops no process and removes no row.

### Keep a row

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Keep the worker we discussed from automatic retirement. Ask me which worker if unclear. Check that its keep mark exists.
```

### What the agent runs

The agent identifies the worker with `fno agents session list`, then uses its exact name or full session ID as `<WORKER>`:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents registry reap --keep <WORKER>
fno agents registry reap --kept
```

The second command lists the keep marks. Check that your worker appears. To allow automatic retirement again, ask your agent to remove that worker's keep mark:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents registry reap --unkeep <WORKER>
```

Save the full session ID before retirement. To restore a retired row, ask your agent to run `fno agents adopt <SESSION_ID>`. It substitutes that saved ID. Then use [resume](#resume-a-stopped-worker) to continue the session.

## Further recovery

If these steps do not bring the worker back, read [Get more help](/docs/troubleshooting.md#get-more-help). It lists the facts to collect.

## Next steps

* [Message agents](/docs/guides/message-agents.md): send a follow-up after the worker resumes.
* [Troubleshooting](/docs/troubleshooting.md): fix a refused launch, a stopped target or red CI.


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