Skip to content

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:

FieldMeaning
acceptedtrue — the message passed admission and was recorded.
deliveredAlways false at send time. A send never claims delivery.
stageThe stage the message has reached so far (see below).
messageIdThe id to pass to agent_message_status.
threadIdThe exchange this message opened or continued. The answer arrives on it.
recipientThe recipient's agentId, the participantId it is bound to (if any), and its state.
launchFor an offline recipient, whether NEXUS could start the agent (see below).
duplicatetrue 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:

StageMeaning
acceptedAdmitted and recorded.
queuedWaiting for its recipient conversation.
notifiedNEXUS wrote a notice to the recipient that mail is waiting. This does not prove the model saw it.
receivedThe recipient conversation read the message with agent_inbox. This is the delivery receipt.
repliedAn answer on the thread was accepted.
refusedNot 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 ​

StateMeaning
READYA running conversation with no active turn.
BUSYA running conversation that is processing a turn or showing an approval prompt.
OFFLINENo 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:

  1. 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.
  2. 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.
  3. 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_REQUIRED and 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 clientMessageId and 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 accepted but never received, and can retry with the same clientMessageId.

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 ​

Built with purpose. chainabit.com