{"record":{"id":"0d5768ae5df1c3be","repo":"warpdotdev/warp","slug":"conversation-conversation-id-is-not-backed-by","errorCode":null,"errorMessage":"Conversation '{conversation_id}' is not backed by a cloud agent task","messagePattern":"Conversation '(.+?)' is not backed by a cloud agent task","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"app/src/ai/agent_sdk/artifact_upload.rs","lineNumber":291,"sourceCode":"}\n\nfn single_conversation_metadata(\n    conversation_id: &str,\n    mut metadata: Vec<ServerAIConversationMetadata>,\n) -> Result<ServerAIConversationMetadata> {\n    match metadata.len() {\n        0 => bail!(\"Conversation not found\"),\n        1 => Ok(metadata.pop().expect(\"metadata length checked\")),\n        _ => bail!(\"Multiple conversations found for '{conversation_id}'\"),\n    }\n}\n\nfn ambient_task_id_from_conversation_metadata(\n    conversation_id: &str,\n    metadata: ServerAIConversationMetadata,\n) -> Result<AmbientAgentTaskId> {\n    metadata.ambient_agent_task_id.ok_or_else(|| {\n        anyhow!(\"Conversation '{conversation_id}' is not backed by a cloud agent task\")\n    })\n}\n\nfn parse_run_id(run_id: &str, error_prefix: &str) -> Result<AmbientAgentTaskId> {\n    parse_ambient_task_id(run_id, error_prefix)\n}\n\nfn load_env_run_id() -> Result<Option<String>> {\n    match env::var(OZ_RUN_ID_ENV_VAR) {\n        Ok(run_id) => Ok(Some(run_id)),\n        Err(env::VarError::NotPresent) => Ok(None),\n        Err(env::VarError::NotUnicode(_)) => Err(anyhow!(\n            \"{OZ_RUN_ID_ENV_VAR} is set but is not valid Unicode\"\n        )),\n    }\n}\n\nfn resolve_env_run_id(env_run_id: Option<String>) -> Result<AmbientAgentTaskId> {","sourceCodeStart":273,"sourceCodeEnd":309,"githubUrl":"https://github.com/warpdotdev/warp/blob/e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc/app/src/ai/agent_sdk/artifact_upload.rs#L273-L309","documentation":"`ambient_task_id_from_conversation_metadata` extracts the cloud ambient-agent task id from server-side conversation metadata. If `ambient_agent_task_id` is absent, the conversation was never backed by a cloud agent task (e.g. a local-only run), and artifact upload — which attaches files to a cloud task — has nothing to attach to.","triggerScenarios":"Calling artifact upload with `--conversation-id <id>` where the fetched ServerAIConversationMetadata has `ambient_agent_task_id: None`.","commonSituations":"Uploading artifacts for a conversation created by a purely local agent run; conversations created before cloud-task backing shipped; targeting a conversation id from a different workspace or server.","solutions":["Pass `--run-id <ambient task id>` explicitly instead of the conversation id","Run the agent through the cloud/ambient path so the conversation gets a backing task id","Verify the conversation id actually belongs to the cloud run you mean"],"exampleFix":"# before\nwarp artifacts upload --conversation-id abc123 file.zip\n# after\nwarp artifacts upload --run-id <ambient-task-id> file.zip","handlingStrategy":"validation","validationCode":"async fn conversation_backed_by_cloud_task(client: &ServerApi, id: &ServerConversationToken)\n    -> anyhow::Result<bool>\n{\n    let meta = fetch_conversation_metadata(client, id).await?;\n    Ok(meta.ambient_agent_task_id.is_some())\n}\n// Offer conversation-based upload only when true; otherwise require --run-id.","typeGuard":"fn backed_by_cloud_task(m: &ServerAIConversationMetadata) -> bool {\n    m.ambient_agent_task_id.is_some()\n}","tryCatchPattern":null,"preventionTips":["Check conversation metadata for ambient_agent_task_id before upload","Always pass --run-id in automation","Do not reuse conversation ids from local-only runs"],"tags":["artifact-upload","conversation","cloud-agent","ambient-agent"],"backgroundTag":null,"analyzedSha":"e72fd7aacbbb2236d9b3be2aad7e7178fe94b4bc","analyzedAt":"2026-08-16T08:27:25.381Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}