Configuring Timeouts
Both the Python and TypeScript/JavaScript SDKs allow you to configure request timeouts at the client level or per-request.Client-Level Configuration
Set a default timeout for all requests when initializing the client:Per-Request Configuration
Override the timeout for individual requests:Orchestrator turns
A turn in orchestrator mode can run for several minutes. The orchestrator hands work to specialist agents, and each delegation is a full agent run of its own. Several can run in sequence or in parallel before the orchestrator writes its answer. What bounds a specialist’s run depends on the runtime:
These are idle limits, not caps on total duration: a specialist that keeps producing output keeps running, so the turn as a whole has no fixed upper bound.
For orchestrator turns:
- Stream the response with
stream: true. Thestartevent arrives as soon as the turn begins, and adelegationevent arrives as each specialist starts and finishes, so you can show progress instead of waiting on a silent connection. - Keep the SDK timeout at or above the 30 minute default. Lowering it for orchestrator turns ends the request while specialists are still working.
- Treat a client timeout as a cancel, not a failure to retry blindly. Closing the connection cancels the turn and any specialists still running. Credits for work that already ran are still consumed, so an automatic retry pays for the delegations again. Raise the timeout and stream instead.