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

# Run a fleet

> Start a worker, choose its lane, watch it, attach to it, and read its result.

A fleet is a group of agent sessions that you run at the same time. Each session on one task is a worker. A receipt is the text that a command prints to tell you what it did. Start with one worker, and add more after you trust its result.

After this page, you have a worker that answered a read-only question. You also know how to choose a lane and how to attach.

## Before you begin

Install F\[no] through the [quickstart](/docs/quickstart.md). You need an authenticated coding harness and a Git repository that your harness trusts.

* A harness is the agent program, such as Claude Code, Codex CLI, OpenCode or pi.
* A lane is the way that the worker runs. The [next section](#choose-a-lane) compares the lanes.

The [CLI reference](/docs/reference/cli.md#worker-launches) lists the launch options.

## Choose a lane

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Choose a suitable worker lane for this task. Say whether its session will remain.
```

Your agent compares thread, pane, and headless lanes for this task. You see whether a session stays available.

### What the agent runs

Add `--as` to choose a lane. If you add no `--as`, the worker uses `thread`.

| Lane | What you get | Use it for |
| - | - | - |
| `thread` | A background session. It stays after your terminal closes. You can attach, mail and resume it. | Most workers |
| `pane` | A session in a pane of the F\[no] mux, the F\[no] terminal multiplexer. | A worker that you want on screen |
| `headless` | One answer, printed in your terminal. No session stays. | One question |

`--once` gives the same result as `--as headless`: one answer and no session. You cannot mail, peek at or attach to a `headless` worker. By default, F\[no] keeps no record of it.

To see a `headless` run in the mux while it runs, add `--mux`. The run then keeps a row in the session list. `--mux` needs `--once` or `--as headless`. The claude, opencode and pi harnesses keep the row.

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents spawn --once --mux --name t-docs-once \
  "Reply with the single word ready. Do not edit files."
```

The answer prints in your terminal, as with any `headless` run. In F\[no] 0.4.9, the row stays in the list after the run ends. To remove it, see [Clean up](#clean-up).

Not every harness has every lane. The [harness reference](/docs/reference/harnesses.md#workflow-prompts) lists the lanes for each harness. If a harness has no `thread` lane, add `--as pane` or `--as headless`.

## Reserve names before launching

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Reserve the names I choose before launching workers. Ask me for the names and preserve the global config's other settings.
```

### What the agent runs

In F\[no] 0.4.6, `names.reserved` excludes names from worker and lead naming. The latest release is 0.4.5. Your agent edits the global user config, normally `~/.fno/config.toml`:

```toml theme={"theme":{"light":"min-light","dark":"min-dark"}}
[names]
reserved = ["Esme"]
```

Replace the example with your chosen names. Keep this list outside the repository. The [configuration reference](/docs/reference/configuration.md#reserve-names) describes matching rules, config paths, and reservation refusals.

## Start a worker

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Have a worker named t-docs-example read README.md and report the repository purpose without editing files.
```

Your agent starts a read-only worker named t-docs-example. You see its receipt and session name.

### What the agent runs

> **Warning:** This starts a persistent coding session. It can incur model costs. Use a repository that you trust.

Your agent runs this from the repository root:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents spawn --name t-docs-example \
  "Read README.md and report its purpose. Do not edit files."
```

The worker uses your [default harness](/docs/reference/harnesses.md#choose-a-default-harness). To use another harness, add `-H` and its name.

The worker runs in the main checkout of the project, not in your current worktree. To choose the directory, add `--cwd <PATH>`.

The command returns after the launch, and a `thread` worker keeps running in the background.

![Reading spawn usage, showing the spawn command, and listing registered sessions](https://mintcdn.com/fno/BXUs9fua_d5sDfAF/images/fleet.gif?s=6df5a8eaeda0c4d177273d19601909fb)

*The launch usage and the session list, recorded in a disposable environment. The launch itself ran on a real machine to make the receipt below.*

If the launch prints a refusal, go to [a refused launch](/docs/troubleshooting.md#a-worker-launch-is-refused).

## Read the launch receipt

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Explain this worker's receipt. Tell me which fields I need later. Ask me which worker if unclear.
```

Your agent explains the receipt fields and identifies the name to reuse. You see which fields do not prove progress.

### What the agent runs

The launch prints one line of JSON. This is a real `thread` receipt, formatted for reading, with four values masked:

```json theme={"theme":{"light":"min-light","dark":"min-dark"}}
{
  "name": "t-docs-example",
  "short_id": "<SHORT_ID>",
  "harness": "<HARNESS>",
  "model": "<MODEL>",
  "model_basis": "requested",
  "status": "spawning",
  "durability": "daemon-owned",
  "incarnation": "29072:1793371076383991",
  "endpoint": "<SOCKET_PATH>"
}
```

Save `name`. The next commands use it.

| Field | Lane | What it tells you |
| - | - | - |
| `name` | All | The name of the worker. Use it in later commands. |
| `short_id` | All | The first part of the session ID. A `pane` receipt can leave it empty. |
| `harness` | All | The agent program that runs the session. |
| `status` | All | `spawning` means the session ID is not known yet. `live` means the session started. Neither proves progress. |
| `model`, `model_basis` | `thread` | The model, and how F\[no] chose it. |
| `durability`, `incarnation`, `endpoint` | `thread` | Where the session runs. You do not need these values. |
| `mux_session`, `pane_id` | `pane` | The mux and pane that hold the worker. |
| `bound`, `seed`, `session_id` | `pane` | The pane has a session, the prompt was submitted, and the full session ID. |

If your prompt is a command, a receipt can also have `effective_message`, `command_fired` and `command_marker`.

Your terminal can also show notes above the receipt, such as a `slot note` line about model limits. These notes do not stop the launch.

## Watch the worker

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

Your agent reads the worker row. You see status, reachability, and progress as separate facts.

### What the agent runs

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

In a terminal, this prints a table with one row for each session. Find the `t-docs-example` row. If you pipe the output, the command prints JSON.

Three readings tell you about the worker. They can differ.

| Reading | Example values | Question it answers |
| - | - | - |
| `status` | `writing`, `orphaned` | What is the process doing? `orphaned` means that it has stopped. |
| `reachability` | `reachable`, `unreachable` | Can mail get to it now? |
| `progress` | `advancing`, `awaiting-operator`, `parked`, `refused`, `unknown` | Is the work moving? |

To show only one kind of worker, filter the list:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents session list --progress awaiting-operator
```

## Find workers that need input

These mux controls ship in F\[no] 0.4.6. The sideline is the panel that lists your sessions.

1. In your terminal, start the mux with `fno mux`.
2. In the sideline's **Agents** view, click the `N need input` count to open the pinned **Needs input** section.
3. Select an agent row to open its session. Remote rows appear here too, with [other machines enabled](/docs/guides/mux-remote-sessions.md#find-the-remote-row).
4. Click the count again to close the section.
5. To answer an open question, click the bell in the tab bar. Select **Questions** and open the question there.

The count includes blocked agent rows on this machine and remote machines. The pinned section contains only agent rows. Those rows also stay in their usual groups. Questions stay in the bell's **Questions** tab and do not add to this count.

![Sideline with a need input count in the top bar and a pinned Needs input section above the project groups](https://mintcdn.com/fno/p8ATAx65_gsjxCjC/images/fleet-needs-input-section.png?fit=max\&auto=format\&n=p8ATAx65_gsjxCjC\&q=85\&s=1da29c74bebbc37ff14583aca0a8c016)

If F\[no] recognizes your terminal on macOS, done notifications use that terminal app's icon.

## Read the result

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Read worker t-docs-example's result and tell me whether it completed the task without changing files.
```

Your agent peeks at the transcript without waking the worker. You see its answer and whether it changed files.

### What the agent runs

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

`peek` reads the transcript. It sends nothing and it does not wake the worker. The answer is in the worker's own words, so it changes from run to run. This is a shortened example from a real run:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
peer t-docs-example: agent=<HARNESS> short_id=<SHORT_ID> recorded_cwd=<PATH>
user: Read README.md and report its purpose. Do not edit files.
assistant: [tool_use: Read]
assistant: README purpose: documents the repo and its three sites. No files edited.
```

You have a worker that read a file and reported the result.

## Attach to the worker

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Attach me to worker t-docs-example so I can continue the conversation.
```

Your agent attaches to the worker session. You see its pane or harness screen and can type to it.

### What the agent runs

To type to the worker yourself, attach to it:

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

What happens next depends on whether a mux is running. To check, run `fno mux ls`.

| Mux | What you see |
| - | - |
| Running | The command prints `thread pane -> t-docs-example (portal 0)`. The number names the portal, a pane that shows a session's live screen. The worker opens in that pane of your mux. The [command page guide](/docs/guides/command-page.md) shows how to start a mux. |
| Not running | The harness screen for the session opens in this terminal. |

The worker keeps running after you leave. Each harness has its own keys to leave, so read the harness footer or its docs. In Claude Code, for example, `←` goes back to the agent list and `Ctrl+Z` goes back to your shell.

If the harness has no attach path, the command refuses and names the reason. If the worker has stopped, the command prints `portal reach: no live row answers t-docs-example`. To continue, use [resume](/docs/guides/recover-a-worker.md#resume-a-stopped-worker).

## Read and type to a running worker

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Show me worker t-docs-example's live screen in a pane, and type one instruction to it. Do not attach.
```

Your agent opens a pane that shows the worker's live screen, reads it, and types your instruction. You watch the worker without leaving your shell.

### What the agent runs

A `thread` worker stays interactive while it runs in the background. On Claude Code, F\[no] runs the lane with `claude --bg`. The worker keeps its [row](#watch-the-worker), takes mail, and shows its screen in a pane. Only the `headless` lane is one-shot: one answer and no session ([Choose a lane](#choose-a-lane)).

A `thread` worker starts with no pane. One command opens one:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno mux thread t-docs-example --portal new
```

The `thread`, `read` and `send` commands need a running mux. To check, run `fno mux ls`. The [command page guide](/docs/guides/command-page.md) shows how to start one.

The command opens a [portal](/docs/guides/mux-remote-sessions.md#open-and-drive-the-session), a pane that shows the worker's live screen. With no flag, the command focuses the worker's portal and opens one for a worker with none. To open the portal at launch, add `--portal new` to `fno agents spawn`.

List the panes. Each line starts with the pane id:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno mux pane ls
```

Find the worker's line by its name: the line for `t-docs-example` carries `name=t-docs-example`.

![Listing panes, submitting text to a pane, and reading the pane screen](https://mintcdn.com/fno/btoMg9ofWEU7ne01/images/thread-pane.png?fit=max\&auto=format\&n=btoMg9ofWEU7ne01\&q=85\&s=e7d8bd108004359380fde614feaa2af8)

*The pane commands on a scratch pane, recorded in a disposable environment. On a worker's portal, `read` shows the harness screen, and `send` types at its prompt.*

Read the screen with the id from the list:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno mux pane read <PANE_ID>
```

Type at the worker's prompt, with the same id:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno mux pane send <PANE_ID> --text "Stay on README.md." --submit
```

Without `--submit`, the command types the text and leaves it at the prompt. When the prompt takes the text, the command prints `submitted`. If the pane shows an option prompt with numbered choices, the command refuses and types nothing. To answer that prompt yourself, add `--raw`: `fno mux pane send <PANE_ID> --text 1 --raw --submit` types the digit `1`.

Mail reaches the same worker. If the worker is mid-turn (while it works on an earlier message), your message waits in its message queue, or steers the live turn. The [receipt](/docs/guides/message-agents.md#read-the-receipt) says which. When the turn ends, the worker reads a queued message. To work in the session yourself, [attach](#attach-to-the-worker).

> **Note:** Claude Code shows the same session in its agent view. Run `claude agents` to list sessions. Run `claude attach <ID>` to open one in your terminal, with the id that `claude --bg` printed at launch.

## Take a screen capture from a worker

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Take a screen capture of the mux window and save it as shots/board.png. Tell me the path.
```

Your agent takes one screen capture through a mux pane. You see the absolute path of the PNG file.

### What the agent runs

On macOS, a worker shell often has no Screen Recording permission, so `screencapture` fails in it. The mux server runs under your terminal app, which can hold that permission. `fno mux pane run --shot` runs the capture in a new pane on that server:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno mux pane run --shot shots/board.png
```

The command needs F\[no] 0.4.9 and a running mux server. It does not start a server. The output folder must exist. Each run replaces an old file at the same path.

| Option | What it does | Default |
| - | - | - |
| `--shot <out.png>` | The PNG file to write | Required |
| `--rect x,y,w,h` | Capture only this screen area | The full display |
| `--window-id <n>` | Capture only this window | The full display |
| `--timeout <secs>` | How long to wait for the file | `15` |

Use `--rect` or `--window-id`, not both. Give no command after the options: `--shot` writes its own command. When the capture ends, the pane closes.

![A pane run shot that prints the PNG path, then the refusals for no mux server and for a command after the options](https://mintcdn.com/fno/3-cp9NoPOzmkorsV/images/pane-shot.png?fit=max\&auto=format\&n=3-cp9NoPOzmkorsV\&q=85\&s=9931f9798c2617d3bd47ee58e5fff75f)

*Real output from a disposable F\[no] home with its own mux server. The capture area was one pixel.*

A success prints the absolute path and exits `0`. Exit `2` means the options are wrong. Exit `1` means no capture. The message names the cause and the server:

| Message says | What to do |
| - | - |
| `no mux server answered` | Start the mux, then run the command again. |
| `output directory ... does not exist` | Make the folder, then run the command again. |
| `lacks Screen Recording` | Start the mux from a terminal app that has Screen Recording, or grant it in **System Settings > Privacy & Security > Screen Recording**. |
| `wrote no PNG within` | F\[no] stopped the pane. Do the Screen Recording step above, or give a larger `--timeout`. |
| `is not a PNG` | The capture exited `0`, but the file is not a PNG. Run the command again. |

`--window-id` takes the macOS window number, the value that `screencapture -l` takes.

## Add parallel work

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Split the project task we are discussing into independent worker tasks with separate end states and files. Show me the assignments before starting workers.
```

Your agent splits the discussed project task into separate worker assignments. You see each end state and file scope before any worker starts.

### What the agent runs

Give each worker a separate end state and separate files. Keep tasks that edit the same files together until you resolve the dependency.

For implementation work, point a worker at a backlog node and its plan. [Ship a change](/docs/guides/ship-a-change.md#plan-before-implementation) shows the command. [Work organization](/docs/concepts/work-contracts.md) explains ownership and worktrees.

If open PRs exceed `agents.max_open_prs` (default `20`), the spawn gate can hold a new target seat in F\[no] 0.4.6. The refusal names `open_pr_cap` and the count. Close or merge PRs before retrying. Existing-PR work stays exempt. A build worker below `agents.min_free_disk_gb` (default `20.0` GB) gets a `disk_floor` refusal naming free space and the floor. Free disk space before retrying. To change either limit, ask your agent to set the global values as shown in [fleet spawn limits](/docs/reference/configuration.md#fleet-spawn-limits). `--force` bypasses neither check.

With 36 open PRs and the default cap, the gate prints:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
spawn-gate: 36 open PRs is above the max_open_prs cap 20; holding the new target seat. Merge or close PRs, then respawn; fix, review and merge work on an open PR still runs. To change the limit: set agents.max_open_prs in ~/.fno/config.toml (0 disables).
```

## Clean up

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Remove the practice worker t-docs-example after it finishes. Report the result.
```

Your agent removes the finished practice worker. You see the removal result while its transcript stays available.

### What the agent runs

Keep this worker for [Message agents](/docs/guides/message-agents.md). After that page, [Recover a worker](/docs/guides/recover-a-worker.md#remove-a-worker) shows how to remove it.

If you skip messaging, remove the worker now:

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

A `headless` row that you kept with `--mux` is removed the same way. In F\[no] 0.4.9, `rm` removes a finished `headless` row without `--force`:

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

The command exits `0` and prints a `removed:` line with the name.

## Next steps

* [Work a backlog with agents](/docs/guides/backlog-and-leads.md): choose a lead level, grant a role, or contact a lead.
* [Run one fleet across machines](/docs/guides/multi-machine.md): add a second machine to the same backlog and chat.
* [Message agents](/docs/guides/message-agents.md): send the worker a follow-up.
* [Recover a worker](/docs/guides/recover-a-worker.md): inspect a quiet worker, then resume or stop it.
* [Harness reference](/docs/reference/harnesses.md): see which lanes your harness has.


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