{"record":{"id":"5fc95e816d208bd2","repo":"warpdotdev/warp","slug":"cloud-agent-failed","errorCode":null,"errorMessage":"Cloud agent failed","messagePattern":"Cloud agent failed","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"app/src/ai/ambient_agents/spawn.rs","lineNumber":292,"sourceCode":"                                yield Ok(AmbientAgentEvent::StateChanged {\n                                    state: task.state.clone(),\n                                    status_message: task.status_message.clone(),\n                                });\n                            }\n\n                            if task.state.is_terminal() {\n                                if matches!(&mode, RunPollMode::Followup { .. }) {\n                                    let exhausted_stale_skips = !seen_working_state\n                                        && skipped_stale_polls >= MAX_STALE_POLLS_BEFORE_FAILURE;\n                                    let message = if exhausted_stale_skips {\n                                        \"Cloud follow-up did not start in time\".to_string()\n                                    } else {\n                                        task.status_message\n                                            .as_ref()\n                                            .map(|msg| msg.message.clone())\n                                            .unwrap_or_else(|| {\n                                                if task.state.is_failure_like() {\n                                                    \"Cloud agent failed\".to_string()\n                                                } else {\n                                                    \"Cloud follow-up finished before a new session became available\".to_string()\n                                                }\n                                            })\n                                    };\n                                    yield Err(anyhow!(message));\n                                }\n                                return;\n                            }\n\n                            if task.state == AmbientAgentTaskState::InProgress\n                                && let Some(session_join_info) = SessionJoinInfo::from_task(&task) {\n                                    let has_new_session = match &mode {\n                                        RunPollMode::InitialRun\n                                        | RunPollMode::Followup {\n                                            previous_session_id: None,\n                                        } => true,\n                                        RunPollMode::Followup {","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/ambient_agents/spawn.rs#L274-L310","documentation":"Fallback error emitted when follow-up polling observes a terminal, failure-like task state and the server attached no status_message. The generic string replaces the missing server explanation and is yielded as an error event on the stream.","triggerScenarios":"get_ambient_agent_task returns a state where task.state.is_terminal() && task.state.is_failure_like(), task.status_message is None, and the run is in RunPollMode::Followup (spawn.rs:287-295).","commonSituations":"Cloud agent run crashed or was failed by the backend without a status message; infrastructure error killed the run; server version that fails to populate status_message on failure paths.","solutions":["Retry the follow-up run - many backend failures are transient","Look up the run_id in the cloud dashboard / via get_ambient_agent_task for details the message lacks","Check Warp and backend status pages for incidents","If persistent, capture the run_id and report it so the missing status_message can be investigated"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match event {\n    Err(e) if e.to_string() == \"Cloud agent failed\" => {\n        let task = client.get_ambient_agent_task(&run_id).await?; // recover details\n        show_failure_details(task); offer_retry();\n    }\n    other => handle(other),\n}","preventionTips":["Always pass the server-provided status_message through when present - this string is the no-message fallback","Keep run_id association so failures without messages can be looked up in the dashboard","Bound automatic retries to avoid loops on permanently failing runs"],"tags":["rust","warp","cloud-agents","ambient-agents","error-handling"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}