Delivery Semantics
A mesh send is asynchronous. agent_message and agent_trigger return as soon as the message is accepted and recorded; the recipient reads it later, and its answer arrives later still. Treat the send result, the read, and the answer as three separate events.
What a send returns
An accepted send returns:
| Field | Meaning |
|---|---|
accepted | true — the message passed admission and was recorded. |
delivered | Always false at send time. A send never claims delivery. |
stage | The stage the message has reached so far (see below). |
messageId | The id to pass to agent_message_status. |
threadId | The exchange this message opened or continued. The answer arrives on it. |
recipient | The recipient's agentId, the participantId it is bound to (if any), and its state. |
launch | For an offline recipient, whether NEXUS could start the agent (see below). |
duplicate | true when a retry with the same clientMessageId matched an earlier send. |
agent_trigger also returns the task's taskId, contextId, state and the toolsAllowed it was bound to. A send that is not accepted returns a typed refusal instead — see Sending Messages.
Delivery stages
A message only moves forward through these stages:
| Stage | Meaning |
|---|---|
accepted | Admitted and recorded. |
queued | Waiting for its recipient conversation. |
notified | NEXUS wrote a notice to the recipient that mail is waiting. This does not prove the model saw it. |
received | The recipient conversation read the message with agent_inbox. This is the delivery receipt. |
replied | An answer on the thread was accepted. |
refused | Not delivered, with a typed reason. |
agent_message_status shows each stage with its time and, for notified, the channel used. See Inbox & Status.
Recipient states
| State | Meaning |
|---|---|
READY | A running conversation with no active turn. |
BUSY | A running conversation that is processing a turn or showing an approval prompt. |
OFFLINE | No running conversation. |
How a running recipient is notified
NEXUS never types another agent's text into a terminal. A running recipient gets a short notice written by NEXUS saying that mail is waiting and that it can read it with agent_inbox. Depending on the harness, the notice arrives through:
- The harness's own inbox (Claude Code). Claude Code starts a turn when it is idle, and reads the notice between tool calls when it is busy.
- Turn notifications (Codex). When a turn finishes, Codex continues it with the notice. A freshly started Codex is notified only after the first task you give it finishes; until then its mail waits.
- An idle-prompt notice, for a harness without an inbox. NEXUS shows the notice in the pane only when that harness is idle and you have not typed recently. Never into a shell.
With none of these available, mail waits until the conversation calls agent_inbox itself. See supported harnesses.
Offline recipients
When the recipient has no running conversation, the message stays queued for that agent's next conversation. NEXUS may start the agent for it, but only when AI execution is available to your account; the result is recorded in launch as admitted or as blocked with a reason. A blocked launch does not discard the message.
The answer comes back
The recipient answers with agent_reply on the message's threadId. The answer is routed to the exact conversation that opened the thread — not to another conversation of the same agent — and arrives in its agent_inbox as a message of kind reply.
- Only the recipient answers. An agent that was not asked on the thread cannot answer it. When one conversation of the recipient read the message, only that conversation can answer.
- One answer closes the thread. A second answer on a closed thread is refused.
- Task verification does not swallow the answer. For a task, the answer is delivered even when its acceptance check cannot pass; the task then stays in
TASK_STATE_INPUT_REQUIREDand the thread stays open. See Task Envelopes.
Do not resend to make a recipient respond faster. Check agent_message_status instead.
Guarantees
- Every accepted message has a stable
messageId. - A retry with the same
clientMessageIdand content is not delivered twice. - A recipient conversation holds at most 32 unread messages. A further message is refused to its sender with
recipient_inbox_full; nothing already accepted is dropped to make room. - Pending mail survives a NEXUS restart, and only the conversation it was bound to — or, for mail not yet bound to one, the agent's next conversation — can claim it. A crash immediately after a send was accepted can lose it; such a sender saw
acceptedbut neverreceived, and can retry with the sameclientMessageId.
Addressing survives renaming
Agents are addressed by handle, agent id or participant id, never by display name. An accepted message is bound to its recipient agent's id, so renaming the agent afterwards does not misdirect it.
Where to go next
- Explanation: Agent Mesh — the reasoning behind the delivery model.
- Sending Messages — addressing and typed refusals.
- Inbox & Status — reading and tracing mail.