{"record":{"id":"3b841529ef1158b3","repo":"warpdotdev/warp","slug":"cloud-follow-up-finished-before-a-new-session-beca","errorCode":null,"errorMessage":"Cloud follow-up finished before a new session became available","messagePattern":"Cloud follow-up finished before a new session became available","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"app/src/ai/ambient_agents/spawn.rs","lineNumber":294,"sourceCode":"                                    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 {\n                                            previous_session_id: Some(previous_session_id),\n                                        } => session_join_info","sourceCodeStart":276,"sourceCodeEnd":312,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/ambient_agents/spawn.rs#L276-L312","documentation":"Informational terminal error for follow-up polling: the run ended in a terminal, non-failure-like state with no status_message, and no new session ever became joinable (SessionJoinInfo::from_task never matched while InProgress). The stream ends with this message rather than a session event.","triggerScenarios":"Follow-up task reaches a terminal non-failure state (e.g. completed) with task.status_message == None, after never yielding session join info - either it finished before a poll observed InProgress with joinable session data, or it completed without creating a session (spawn.rs:290-295, 303-304).","commonSituations":"Very short follow-up that completes between two polls; follow-up that ends without spawning a session (e.g. nothing to do); polling interval too coarse for fast runs.","solutions":["Refresh the agent/task list to pick up any session created near the end of the run","Treat as benign completion and resync local ambient-agent state instead of surfacing a hard error","Re-trigger the follow-up if a new session was expected","If sessions routinely appear after this error, shorten the poll interval so InProgress + join info is observed"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match event {\n    Err(e) if e.to_string().contains(\"before a new session became available\") => {\n        refresh_agent_sessions().await; // benign terminal case; resync instead of erroring\n    }\n    other => handle(other),\n}","preventionTips":["Poll fast enough that short InProgress windows with joinable session info are observed","Treat non-failure-like terminal follow-ups as completions, not hard errors, in UX copy","Resync the local session list whenever a follow-up stream ends"],"tags":["rust","warp","cloud-agents","ambient-agents","polling"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}