#### Features

# Agent messaging

In Grok Build 2.0 and later, agents in one session can send each other messages while they work. The main agent can correct a [subagent](/build/features/subagents) mid-task without stopping it, a subagent can report something early and keep going, and two subagents working on related code can tell each other what they changed. You can also write to a subagent yourself.

## How agents message each other

Agents decide when to message each other. You can also ask for it in your prompt:

```text
Start one subagent to update the parser and one to update its tests.
Have each tell the other when it renames a function.
```

An agent can message any other agent in the same session, one recipient at a time. A message either joins the recipient's current turn (`steer`) or waits for a later turn (`queue`). Grok tells each agent that a message from another agent is never a request or an approval from you.

## What you see

Each message is a row in the transcript. An agent's name is the short description it was started with, such as `Audit tax rounding`.

| Transcript | Row |
| --- | --- |
| The sender's | `Sent message to Audit tax rounding · steer: “Discount codes now apply before tax.”` |
| The recipient's | `Audit tax rounding sent a message: “Tax is rounded per line. Totals can be a cent off.”` |
| The main agent's, for a message between two of its subagents | `Audit tax rounding sent a message to Update tax tests · steer: “Rounding moved to the order total.”` |

In a subagent's view, the agent that started it is named `parent`. Two or more messages in a row fold into one row, such as `3 messages with Audit tax rounding`; a received message that starts the agent's turn stays on its own row.

Press `Right` to expand a row and `Left` to collapse it. `Enter` opens the subagent at the other end, or expands a folded row. The main agent's transcript shows messages between the subagents it started, but not between subagents further down.

## Write to a subagent yourself

Open a subagent's view with `Enter` on its row. Press `Space` to focus the message box and type. By default, `Enter` queues your message for a later turn, and `Ctrl+Enter` (or [your terminal's send-now key](/build/keyboard-shortcuts#terminal-differences)) steers the subagent's running turn without stopping it. If your terminal doesn't send that key, set `follow_up_behavior = "steer"` under `[ui]` in `config.toml` so `Enter` steers.

A toast says whether your message joined the subagent's running turn (`Steering …`), waits (`Queued for …` or `Queued after its current task …`), or woke an idle subagent (`Waking …`). The message box takes plain text only: no slash commands, no images.

You can write to any subagent the main agent started. There's no message box for a subagent started by another subagent, for an agent a workflow runs, or for a subagent from before you resumed the session, until the main agent runs it again. To reach one of those, ask the main agent to pass your message on.

## Limits

To keep agents from talking among themselves indefinitely, Grok counts their messages since you last wrote to the main agent. Your own messages don't count. Limits that clear on their own aren't listed.

| Limit | Value | Past it |
| ----- | ----- | ------- |
| Length of one message | 32,000 characters | An agent's message is cut and ends with `…[clamped]`. Yours is refused |
| Messages from agents to the main agent | 16 | Refused until you write to the main agent |
| Messages between all agents in the session | 64 | Refused until you write to the main agent |

## When a message isn't delivered

Press `Right` on a `not delivered` row to read the reason.

| Reason | What it means | What to do |
| ------ | ------------- | ---------- |
| `target stopped by user` | You stopped that subagent | Write to it or to the main agent; agents can message it again afterward |
| `budget root inbound`, `budget tree epoch` | A [limit](#limits) was reached | Write to the main agent |
| `budget sender per turn`, `budget pair in flight` | An agent sent too many messages in one turn, or too many are waiting for one recipient | Nothing; it clears on its own |
| `target needs resume` | The recipient was closed or reopened, as after a restart | Ask the agent that started it to resume it with the message. If it's the main agent, write to it |

An `unconfirmed` message may or may not have arrived. Open the recipient's view and check before you ask the agent to send it again.

## Turn it off or on

Agent messaging is on by default in Grok Build 2.0 and later. To turn it off, set `active_agent_messages = false` under `[features]` in `~/.grok/config.toml`, or start Grok with `GROK_ACTIVE_AGENT_MESSAGES=0`; to turn it on, use `true` or `1`. Turning it off takes effect from your next prompt. Turning it on takes a restart of Grok.
