warpdotdev/warp · error
Cloud follow-up did not start in time
Error message
Cloud follow-up did not start in time
What it means
In monitor_spawned_task's poll loop with RunPollMode::Followup, polls that return a non-working, non-Cancelled state before any working state was observed are treated as the previous run's residual terminal state and skipped. After MAX_STALE_POLLS_BEFORE_FAILURE (10) such skips, if the task is terminal and no working state was ever seen, the stream ends with this error: the server never transitioned the follow-up into a running state.
Source
Thrown at app/src/ai/ambient_agents/spawn.rs:285
// alive indefinitely.
skipped_stale_polls += 1;
continue;
}
if last_state.as_ref() != Some(&task.state) {
last_state = Some(task.state.clone());
yield Ok(AmbientAgentEvent::StateChanged {
state: task.state.clone(),
status_message: task.status_message.clone(),
});
}
if task.state.is_terminal() {
if matches!(&mode, RunPollMode::Followup { .. }) {
let exhausted_stale_skips = !seen_working_state
&& skipped_stale_polls >= MAX_STALE_POLLS_BEFORE_FAILURE;
let message = if exhausted_stale_skips {
"Cloud follow-up did not start in time".to_string()
} else {
task.status_message
.as_ref()
.map(|msg| msg.message.clone())
.unwrap_or_else(|| {
if task.state.is_failure_like() {
"Cloud agent failed".to_string()
} else {
"Cloud follow-up finished before a new session became available".to_string()
}
})
};
yield Err(anyhow!(message));
}
return;
}
if task.state == AmbientAgentTaskState::InProgressView on GitHub (pinned to e72fd7aacb)
Solutions
- Retry the follow-up run: spawn a new follow-up so the server creates a fresh task record
- Inspect the run via get_ambient_agent_task or the cloud dashboard to confirm the server-side state
- If backend start latency is legitimately high, raise MAX_STALE_POLLS_BEFORE_FAILURE or the poll interval
- If it reproduces consistently, report it - a wedged server that never leaves the residual terminal state
Defensive patterns
Strategy: retry
Try / catch
while let Some(event) = stream.next().await {
match event {
Err(e) if e.to_string() == "Cloud follow-up did not start in time" => {
retry_followup_once().await; // server was wedged on residual state
}
other => handle(other),
}
} Prevention
- Give follow-up starts a generous window: tune MAX_STALE_POLLS_BEFORE_FAILURE to backend start latency
- Log run_id with every stale-skip so wedged servers can be traced from telemetry
- Confirm the follow-up task record exists before entering the poll loop
When it happens
Trigger: Polling get_ambient_agent_task for a follow-up run where the server keeps reporting the prior run's terminal state (state.is_working() false, not Cancelled) for 10+ consecutive polls and then reports a terminal state, with seen_working_state still false (spawn.rs:251-285).
Common situations: Cloud backend wedge where the follow-up task is stuck on the previous run's terminal state; backend start latency longer than 10 poll cycles; follow-up request accepted but the task record was never created/transitioned.
Related errors
- Cloud follow-up finished before a new session became availab
- Cloud agent failed
- Error polling OAuth status: {err}
- Schedule not found
- Failed to delete schedule: {}
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/8f8dc7f9bb638ae9.
Report an issue: GitHub.