Skip to main content

Steering and queuing

In normal Laravel application flows, you usually do not use steering directly. This is mainly an internal SDK-level capability and is harder to benefit from in synchronous Laravel patterns.
There are two patterns for sending messages while an agent is processing: steering and queuing.

Overview

All of send(), sendAndWait(), sendAndStream(), and Copilot::run() have a $mode parameter.

Steering ("immediate")

This injects a message directly into the turn the agent is currently processing. The agent receives it in real time and adjusts the response. Use this when you want to correct direction without interrupting ongoing work.
Steering is best-effort. If the agent already committed a tool call, steering is applied after that tool call completes, but still within the same turn. If the steering message arrives after the turn is already complete, it is automatically moved to the queue.

Queuing ("enqueue")

This adds messages to a queue and processes them in order after the current turn completes. Each queued message runs as an independent turn. This is the default behavior when $mode is omitted.

Practical perspective in Laravel

In Laravel, synchronous patterns with Copilot::run() and sendAndWait() are common. These send a message and wait until idle, so there is no practical chance to interrupt while the agent is processing, and $mode is effectively irrelevant.
Steering ("immediate") is useful when you send messages asynchronously with send() and can intervene in an in-progress turn using another message. In Laravel’s synchronous flow, creating that opportunity is difficult, so it is usually best to keep the default mode and avoid specifying $mode.

Which should you use?

Best practices

  • Default to queuing — Omitting $mode (or using "enqueue") is appropriate in most cases. It gives predictable behavior.
  • Use steering for correction — Use "immediate" only when the agent is clearly doing the wrong thing.
  • Keep steering messages concise — Use short messages understandable in the current context. Long and complex steering messages can cause confusion.
  • Avoid repeated steering bursts — Sending multiple steering messages in a short time can degrade turn quality. For major direction changes, it may be better to stop the turn and restart.

See also

For the latest updates, see the GitHub repository.
Last modified on April 20, 2026