warpdotdev/warp · error
Timed out sending orchestration message{}
Error message
Timed out sending orchestration message{} What it means
Raised by `send_agent_message_with_timeout` (native builds only; the WASM variant has no timeout) when an inter-agent orchestration send — `server_api.send_agent_message_for_task(&task_id, request)` or `ai_client.send_agent_message(request)` — does not complete within SEND_AGENT_MESSAGE_TIMEOUT (15 seconds). `futures::future::select` races the send against `Timer::after`; the timer winning produces this error, with the task id appended when one is known.
Source
Thrown at app/src/ai/blocklist/action_model/execute/send_message.rs:94
) -> anyhow::Result<SendAgentMessageResponse, anyhow::Error> {
let task_id_for_timeout = task_id.map(|task_id| task_id.to_string());
let send_message = async move {
match task_id {
Some(task_id) => {
server_api
.send_agent_message_for_task(&task_id, request)
.await
}
None => ai_client.send_agent_message(request).await,
}
};
let timeout = Timer::after(SEND_AGENT_MESSAGE_TIMEOUT);
futures::pin_mut!(send_message);
futures::pin_mut!(timeout);
match futures::future::select(send_message, timeout).await {
Either::Left((result, _)) => result,
Either::Right(_) => Err(anyhow!(
"Timed out sending orchestration message{}",
task_id_for_timeout
.map(|task_id| format!(" for task {task_id}"))
.unwrap_or_default()
)),
}
}
#[cfg(target_family = "wasm")]
async fn send_agent_message_with_timeout(
server_api: std::sync::Arc<crate::server::server_api::ServerApi>,
ai_client: std::sync::Arc<dyn crate::server::server_api::ai::AIClient>,
task_id: Option<AmbientAgentTaskId>,
request: SendAgentMessageRequest,
) -> anyhow::Result<SendAgentMessageResponse, anyhow::Error> {
match task_id {
Some(task_id) => {
server_apiView on GitHub (pinned to e72fd7aacb)
Solutions
- Check network/WS_SERVER_URL health and retry the send — the timeout is a fixed 15s client ceiling, so transient slowness is the most common cause
- Verify the client is still authenticated and the GraphQL v2 WebSocket is connected before blaming payload size
- If it reproduces consistently, measure server-side latency of send_agent_message; 15s is hard-coded in SEND_AGENT_MESSAGE_TIMEOUT and cannot be tuned per call
- Keep sends task-id-routed so a timed-out message can be correlated and safely re-sent
Example fix
// before
match futures::future::select(send_message, timeout).await {
Either::Left((result, _)) => result,
Either::Right(_) => Err(anyhow!("Timed out sending orchestration message{}", ..)),
}
// after: classify the timeout as retryable and retry once with backoff
let result = match futures::future::select(send_message, Timer::after(SEND_AGENT_MESSAGE_TIMEOUT)).await {
Either::Left((result, _)) => result,
Either::Right(_) => Err(anyhow!("Timed out sending orchestration message (retryable)")),
};
result.or_else(|e| async { /* backoff, rebuild request, resend */ Err(e) }).await Defensive patterns
Strategy: retry
Try / catch
match send_agent_message_with_timeout(server_api, ai_client, task_id, request).await {
Ok(resp) => resp,
Err(e) if e.to_string().contains("Timed out") => {
// transient: back off and retry once before reporting TeamAgentCommunicationFailed
std::thread::sleep(Duration::from_millis(500));
send_agent_message_with_timeout(server_api, ai_client, task_id, request).await?
}
Err(e) => return Err(e),
} Prevention
- Keep orchestration messages small and idempotent so a 15s timeout can be retried safely
- Verify the GraphQL v2 WebSocket is connected before starting multi-agent runs
- Always route sends through a task id so timed-out messages can be correlated and reconciled server-side
When it happens
Trigger: A team/ambient agent sends an orchestration message (task-id-routed or plain) and the server API future hangs or exceeds 15s: stalled network, slow server-side ack, backlogged GraphQL v2 WebSocket, or a half-open connection after suspend/resume that never errors on its own.
Common situations: Multi-agent orchestration on a poor network; warp-server backend slow to acknowledge; proxy/firewall stalling the WebSocket endpoint; machine sleep/wake leaving the client connection dead but not failed.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Timed out refreshing team metadata
- Failed to fetch images: {}
- Timed out waiting for Warp Drive to sync
- Failed to fetch images: {err}
- Error polling OAuth status: {err}
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/c3ad654afbedc3e5.
Report an issue: GitHub.