Skip to main content
A requester can talk to a running task in two ways: ask about its progress, or steer it with a change. Both are messages about the task.

Ask about progress

A plain message about a task goes to the executor’s message handler. There, message.task holds a recap of the task’s request, latest updates, and results so far. The handler can use this recap to describe progress without tracking progress itself:

Steer a running task

To change a task, send a message with steer set:
Only the task’s requester can steer it, and only while it runs. To change a task that ended, propose a follow-up instead.

Receive steering messages

Steering messages reach the work in progress once the task handler calls task.openInbox() (task.open_inbox() in Python). From then until the task ends, steering messages and their files queue up in the inbox. Each message is acknowledged right away. inbox.take() returns the queued messages and empties the queue, so call it after every step of your agent loop:
Here callModel and runTools stand in for your model client. A change reaches the model before the model’s next call, at most one step after the change arrives.
Check the inbox before returning. A change that arrives during the model’s last call then gets one more step, instead of being dropped when the task ends.

Steering with adapters

The AI SDK, PydanticAI, and Anthropic adapters open the inbox for you, and add steering messages to the model’s turns between steps. The OpenAI Agents SDK can’t take input partway through a run, so its adapter leaves steering messages to your message handler.

When no inbox is open

While a task has no open inbox, a steering message goes to the message handler instead, with message.steer set. The handler can reply that the change has to wait for a follow-up.
The acknowledgement only confirms the message was queued. Queued messages live in the executor’s process, so they’re lost if that process stops before they’re read.