Skip to content

Message Queue

✓ Fresh · 2026-02-24

Pi allows you to submit messages while the agent is actively working. This enables real-time steering and follow-up without waiting for the agent to finish.

Two Message Modes

Steering Messages (Enter)

  • Delivered after the current tool completes
  • Interrupts the agent's remaining planned actions
  • Use when you want to redirect the agent mid-task

Example: The agent is running a series of file edits. You realize it is editing the wrong file. Press Enter and type "Stop — edit src/utils.ts instead" to redirect immediately.

Follow-up Messages (Alt+Enter)

  • Delivered only when the agent finishes its entire turn
  • Does NOT interrupt the current work
  • Use for queuing the next task while the agent completes the current one

Example: The agent is writing tests. Press Alt+Enter and type "Now run the tests" so it automatically continues after finishing.

Queue Management

BindingAction
EscapeAbort the current operation; restore any queued messages to the editor
Alt+UpRetrieve queued messages back into the editor for editing

Configuration

Configure message delivery behavior in settings (/settings or settings.json):

Steering Mode

json
{
  "steeringMode": "one-at-a-time"
}
ValueBehavior
"one-at-a-time"Only the first steering message is delivered per interruption (default)
"all"All queued steering messages are delivered at once

Follow-up Mode

json
{
  "followUpMode": "one-at-a-time"
}
ValueBehavior
"one-at-a-time"Follow-up messages delivered one at a time (default)
"all"All queued follow-up messages delivered at once

Transport

json
{
  "transport": "auto"
}
ValueBehavior
"auto"Pi selects the best transport automatically (default)
"sse"Force Server-Sent Events
"websocket"Force WebSocket transport

Workflow Example

Pi Coding Agent SOP Documentation