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

# Message agents

> Send a worker a follow-up, read the real receipt, and check the answer.

Agent mail sends a message to a session that exists. It does not create a session.

After this page, you have sent a worker one question and read its answer. You can also read each mail receipt.

## Before you begin

Install F\[no] through the [quickstart](/docs/quickstart.md), and create the `t-docs-example` worker with [Run a fleet](/docs/guides/run-a-fleet.md). A `headless` worker cannot get mail, because no session stays.

The [CLI reference](/docs/reference/cli.md#agent-mail) has the command shape.

## Send one follow-up

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Ask worker t-docs-example: "Which README heading best explains the repository? Do not edit files."
```

Your agent sends the README question to t-docs-example. You see the delivery receipt and message ID.

### What the agent runs

Your agent addresses the worker by its registered name and sends this from a terminal:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents mail send t-docs-example "Which README heading best explains the repository? Do not edit files."
```

`fno mail send` is the root spelling of `fno agents mail send` in F\[no] 0.4.6. Both use the same arguments and receipts. The latest release is 0.4.7.

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno mail send t-docs-example "Which README heading best explains the repository? Do not edit files."
```

Use either spelling for one message. Running both sends it twice.

A name works on every harness. F\[no] resolves the name to the session ID of the worker, and sends to that ID. A full session ID also works. A shortened ID can match several sessions, and F\[no] can refuse it.

## Read the receipt

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Read the mail receipt for my last message and tell me whether it reached the worker.
```

Your agent reads the receipt. You see whether the message started a new turn, steered a live turn, typed to a pane, or queued.

### What the agent runs

The command prints one line of JSON. This is a real receipt, with the transcript path masked:

```json theme={"theme":{"light":"min-light","dark":"min-dark"}}
{"msg_id":"fmail-bd4c93df379d","subject":null,"to":"t-docs-example","status":"accepted-new-turn (<TRANSCRIPT_PATH>)"}
```

Read `status`. It says how far the message got.

| `status` starts with | What it means | Your next check |
| - | - | - |
| `accepted-new-turn` | The transcript of the worker holds the message as a new turn. | Peek for the answer. |
| `accepted-steer` | The worker read the message during the turn that was running. | Peek for the answer. |
| `typed (pane <ID>)` | F\[no] typed the message at the prompt of a pane. It has no other proof. | Peek for the `msg_id`. |
| `typed pane-raw (pane <ID>)` | The mail lane to the pane failed before it typed anything. F\[no] then typed the message one time through the raw pane door. It has no other proof. | Peek for the `msg_id`. |
| `queued (durable)` | F\[no] stored the message. No live path reached the worker. | Check that the worker can resume. |

`accepted` does not prove that the worker acted on your message. Only the transcript can show that.

### The receipt says NOT LANDED

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Find the NOT LANDED message in the current mail thread. Check the recipient transcript, then follow the safe recovery steps without sending a duplicate.
```

Your agent checks the recipient transcript before recovery. If needed, it resumes the worker and avoids a duplicate send.

#### What the agent runs

A `queued (durable)` receipt can come with this block:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
fmail-<ID> NOT LANDED - not claimed on the bus, not in the recipient transcript
  verify:                 fno agents peek <WORKER> --grep fmail-<ID>
```

The same advice applies to every `queued (durable)` receipt. F\[no] holds a copy, and the worker gets it the next time it reads its mail. Do not send a second copy while this copy waits, because the worker then gets it twice.

The block prints the older spelling `fno agents peek`. It runs the same command as `fno agents session peek`.

To recover, do these steps in order:

1. To look for the message in the transcript, run `fno agents session peek <WORKER> --grep fmail-<ID>`.
2. To wake the worker, run `fno agents session resume <WORKER>`.
3. If you still need to send again, first withdraw the copy with `fno agents mail admin withdraw fmail-<ID>`. Then send the message.

### The name is wrong

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Find the registered name for the worker we discussed. Ask me which worker if unclear.
```

Your agent lists sessions and identifies the registered worker name. You see the exact name to use.

#### What the agent runs

This is a real refusal, with the session IDs and names masked:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
unknown agent or live-session handle: 'no-such-worker'. Send to a session id. Closest live sessions: <SHORT_ID> (<NAME>), <SHORT_ID> (<NAME>), <SHORT_ID> (<NAME>), <SHORT_ID> (<NAME>), <SHORT_ID> (<NAME>).
```

The command exits with code 16 and sends nothing. The refusal lists up to five live sessions as a short session ID and a name. The refusal tells you to send to a session ID, but an exact name also works. If your worker is in the list, send to its ID or to its exact name. If it is not in the list, run `fno agents session list`, and copy the exact name.

![A mail send to the unknown name no-such-worker, refused with exit code 16 and a list of the closest live sessions, with the IDs and names masked](https://mintcdn.com/fno/s_NJfZAVVQ6FKlmA/images/mail-unknown-name.png?fit=max\&auto=format\&n=s_NJfZAVVQ6FKlmA\&q=85\&s=704364816ce5fc67b1b7a8c9e8b39170)

*The real output of one refused send, with the session IDs and names masked, rendered as a still.*

## Mail the lead of a scope

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Send the lead of the fno scope my review report. Tell me which session got it.
```

Your agent sends the report to the session that holds the lead role for that scope now. You see which session got it.

### What the agent runs

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents mail send --to-lead fno --body-file report.md
```

`--to-lead` addresses a role, not a session. F\[no] finds the session that holds the lead role at send time. A lead can change, so do not copy a lead's name for later mail. Use `--to-lead` again.

The message can come from one of three forms. Use only one:

* the one positional message: `fno agents mail send --to-lead fno "The review is done."`
* `-b <body>`
* `--body-file <path>`

The first line on stderr names the session that got the message, for example `--to-lead <SCOPE>: resolved to <NAME>`.

| What happens | Exit code | What F\[no] does |
| - | - | - |
| One live session holds the role. | Set by the delivery, as for any send | It sends the message to that session. Read the receipt. |
| No live session holds the role. | 16 | It refuses and queues nothing. Run `fno agents team` to see who leads what. |
| Two or more live sessions hold the role. | 17 | It refuses, names each session, and sends to none. Run `fno agents team` to see the split, or send to one session by name. |
| You add a second positional. | 2 | It refuses. `--to-lead` takes only the message as a positional. |

`--to-lead` does not work with `--to-project`, `--to-self`, `--raw`, `--force` or `--any`. Each of these flags picks a different address, and the command exits with code 2.

When no session holds the role, the refusal reads like this, with the scope masked:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
--to-lead '<SCOPE>' refused: no live row holds this role right now, and nothing was queued. Run `fno agents team` to see who does, or address a specific handle.
```

## Reply to a message

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Reply to mail fmail-<ID> with "ack", from the web project.
```

Your agent replies on the thread of that message. You see the reply ID and its thread.

### What the agent runs

Name the message you answer with its `msg_id`. Both forms do the same thing:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
fno agents mail reply --to fmail-<ID> --from web "ack"
fno agents mail reply fmail-<ID> --from web "ack"
```

The second form takes the `msg_id` as the first positional. If a positional starts with `fmail-` or `msg-` and has no spaces, F\[no] reads it as a `msg_id`. The body is the next positional, `--body <str>`, or `--body-file <path>`. `--from <project>` names the project that sends the reply.

The reply goes back by the lane of the message you answer. A real receipt, with the IDs masked:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
appended reply fmail-<ID> to thread fmail-<ID> (in web)
```

Do not use `--to` and a positional `msg_id` together. That gives two targets. The command exits with code 2:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Error: Got two reply targets: --to 'fmail-<ID>' and positional 'fmail-<ID>'. Name the message once.
```

A reply with no target exits with code 2 and names both forms:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Error: Missing option '--to'. Reply forms: fno agents mail reply --to <msg-id> <body>, or fno agents mail reply <msg-id> <body>.
```

A flag that is almost right also exits with code 2. The error names the correct flag and prints the full corrected command. Run that command:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Error: Unknown argument: '--from-name'. Did you mean '--from'?
Corrected: fno agents mail reply fmail-<ID> --from web --body ack
```

## Check the answer

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Read worker t-docs-example's reply to my last message and tell me whether it answered the question.
```

Your agent peeks at the transcript and matches it to the receipt ID. You see the answer or learn the worker has not finished.

### What the agent runs

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

The answer is in the worker's own words. 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>
peer: `@<SENDER> · fmail-bd4c93df379d`
Which README heading best explains the repository? Do not edit files.
assistant: The top-level heading. Its intro explains what the repo is.
```

Your question has the same `msg_id` as the receipt. That proves that this question is your message.

If you see your question and no answer, the worker has not finished. Wait, and peek again. If you see no question, the message did not land.

You sent a worker a question and read its answer.

## Read a held release

> **Note:** The fold line is on the main branch after F\[no] 0.4.8rc1. The 0.4.7 release and 0.4.8rc1 do not include it. On those releases, the count line exists and every message renders whole, with no fold line.

Mail that cannot land right away waits on the bus, F\[no]'s mail store. A receipt that says `queued (durable)` names one such waiting mail. F\[no] holds delivery so mail cannot interrupt an active worker. The hold states: you typing into it, a draft open in its composer, its row Blocked in [Needs input](/docs/guides/run-a-fleet.md#find-workers-that-need-input), its Stop hooks still running. A stopped worker, one whose process ended, holds nothing, so mail still reaches it and can wake it.

When the hold lifts, F\[no] delivers the waited mail as one turn. That turn is the held release.

Every hold has an end. A worker can also ask for a do-not-disturb hold with `fno agents mail admin hold`. `--for <minutes>` holds for that many minutes on the wall clock. `--minutes <minutes>` holds until that many quiet minutes pass. `--on` holds until the hold ceiling, and `--off` lifts the hold and delivers the held mail. No hold lasts longer than the ceiling, so `--for` and `--minutes` also stop at the ceiling. The ceiling is 480 minutes by default. To change it, set [`mail.hold.max_minutes`](/docs/reference/configuration#mail-hold-ceiling).

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Find the last held release in a worker transcript and tell me what each line counts.
```

Your agent reads the transcript and explains what each line counts. No held release there means this worker held no mail yet. To make one, have another agent mail a worker, then type in its pane as the mail arrives. The mail waits, and the release lands after you stop typing.

### What the agent runs

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

The turn's lines match the example below. To open the worker's pane yourself, [Attach to the worker](/docs/guides/run-a-fleet.md#attach-to-the-worker) shows the way. Worker t-docs-example received three check-in wake mails and one review answer while you held it busy:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
4 held messages · sent 09:05 to 10:35 · held 210m
`@docs-lead · fmail-9c41f2b7d0e8`
The README review is done. Two findings, both fixed.
`fno-lead-wake x3, newest 150m`
```

![A terminal window with a held-release digest: a count line, two single mails with their message ids, and a folded build-bot line. The release is synthetic and rendered by the real render\_held\_release\_at, not a captured live hold.](https://mintcdn.com/fno/hR5_o4xPqOuW1y7W/images/mail-held-digest.png?fit=max\&auto=format\&n=hR5_o4xPqOuW1y7W\&q=85\&s=ea8ee079865256467af86a77efa55c83)

*A synthetic release, rendered by the real `render_held_release_at` from invented senders and times. It is not a captured live hold, and its names and numbers differ from the example above.*

Read the turn line by line:

| Line | What it tells you |
| - | - |
| `4 held messages · sent 09:05 to 10:35 · held 210m` | Four mails waited between 09:05 and 10:35, the first and last send times. The hold lasted 210 minutes, from the first wait at 09:05 to the release at 12:35. The count includes the folded repeats. |
| `` `@docs-lead · fmail-9c41f2b7d0e8` `` | The one mail that mattered, whole under its header. Answer it as [send one follow-up](#send-one-follow-up) shows, addressed to docs-lead. |
| `` `fno-lead-wake x3, newest 150m` `` | Three near-identical wake mails from the fno-lead-wake sender folded to one line. The newest wake was 150 minutes old at the release. |

A fold groups mails from one sender whose bodies differ only in digits and whitespace runs. Wake mails are check-in reminders from the fno-lead-wake sender, and two that differ only in their minute count share one shape. Bodies that differ any other way never group. The counts always add up: the headers and the `x` counts together equal the first line's total. A fold line shows the name without `@` and carries no msg id, so there is nothing to answer in it.

### A body cannot carry a fold line

A mail whose body carries a fold line refuses to send. A fold line is one backticked span covering a whole line. Prose that only mentions the shape sends fine. The refusal reads:

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
mail body holds a line shaped like a held-release fold line. The envelope frames peer mail; a body cannot forge a fold count.
```

Only the held-release renderer writes whole fold lines, so a delivered fold count is always true.

## Read the Messages view

The mux has a view for this mail. It shows every conversation on this machine, plus mail from your other machines, and you read it yourself. [Read mail in the Messages view](/docs/guides/messages-view.md) covers the opening chord, the columns, the reply control, and copying a mail ID.

## Mail can wake a stopped worker

```text theme={"theme":{"light":"min-light","dark":"min-dark"}}
Send a follow-up to the worker we are discussing. If it stopped, see whether mail can wake it and report the delivery receipt.
```

Your agent sends the follow-up and reads the receipt. You see its status. Other harnesses can differ.

### What the agent runs

In a real test with Claude Code, a stopped `thread` worker took a new message and answered it. The receipt was `accepted-new-turn`.

Other harnesses can differ, so read the receipt. Stopping a worker does not always end its ability to take mail. To bring a stopped worker back on purpose, use [resume](/docs/guides/recover-a-worker.md#resume-a-stopped-worker). To end that, [remove the worker](/docs/guides/recover-a-worker.md#remove-a-worker).

## Next steps

* [Recover a worker](/docs/guides/recover-a-worker.md): inspect a worker that does not answer, then remove your practice worker.
* [CLI reference](/docs/reference/cli.md#agent-mail): look up the send and peek arguments.


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