Long-running agents are in preview. APIs and package versions are subject to change.
Turn on steering
Responses protocol
Setsteerable_conversations=True on ResponsesServerOptions:
409 conversation_locked. Send the follow-up as a new response with previous_response_id set to the running response and the same agent_session_id.
Invocations and task primitives
Passsteerable=True to @multi_turn_task:
steerable=True, a concurrent .start() on an in-flight chain raises TaskConflictError.
Wind down the active turn
When something is queued, the framework signals the running handler through the cooperative cancel signal. A steerable handler should check for it at safe boundaries and return early so the queued turn can take over:Order turns with a precondition
When a client reasons about message ordering, passif_last_input_id so a stale caller can’t append after another caller has advanced the chain. It’s the input-queue equivalent of an HTTP If-Match:
LastInputIdPreconditionFailed.
Handle a full queue
The steering queue is bounded. When it’s full, an enqueue raisesSteeringQueueFull; surface a clear “please wait” signal to the user rather than dropping the input silently: