warpdotdev/warp · error · anyhow::Error
Failed to resolve artifact upload association: no usable --r
Error message
Failed to resolve artifact upload association: no usable --run-id or --conversation-id was provided, and {OZ_RUN_ID_ENV_VAR}: {env_err} What it means
Artifact upload association needs an explicit `--run-id`, a `--conversation-id`, or a usable OZ_RUN_ID (injected by the Oz runner). With none supplied, `resolve_env_run_id` fails ('not set' or invalid) and this error surfaces the env cause as `{env_err}`.
Source
Thrown at app/src/ai/agent_sdk/artifact_upload.rs:373
return Ok(ResolvedUploadAssociation {
conversation_id: Some(conversation_id),
run_id: None,
ambient_task_id,
});
}
Err(env_err) => env_err,
};
return Err(anyhow!(
"Failed to resolve artifact upload association for conversation '{}': {conversation_err}; also failed to use {OZ_RUN_ID_ENV_VAR}: {env_err}",
conversation_id.as_str()
));
}
}
}
let ambient_task_id = resolve_env_run_id(env_run_id).map_err(|env_err| {
anyhow!(
"Failed to resolve artifact upload association: no usable --run-id or --conversation-id was provided, and {OZ_RUN_ID_ENV_VAR}: {env_err}"
)
})?;
Ok(ResolvedUploadAssociation {
conversation_id: None,
run_id: Some(ambient_task_id),
ambient_task_id,
})
}
#[cfg(test)]
#[path = "artifact_upload_tests.rs"]
mod tests;
View on GitHub (pinned to e72fd7aacb)
Solutions
- Pass `--run-id <ambient task id>` with the upload
- Or export OZ_RUN_ID=<task id> in the environment before uploading
- If you expect to be inside a runner, verify the runner actually injected OZ_RUN_ID (echo it)
Example fix
# before warp artifacts upload results.log # after warp artifacts upload --run-id <ambient-task-id> results.log
Defensive patterns
Strategy: validation
Validate before calling
use std::env::var_os;
fn has_upload_association(run_id: Option<&str>, conv_id: Option<&str>) -> bool {
run_id.is_some()
|| conv_id.is_some()
|| var_os("OZ_RUN_ID").is_some_and(|v| v.to_str().is_some())
}
// Refuse to stage artifacts for upload when false. Prevention
- Always pass --run-id in upload scripts
- Verify the runner injects OZ_RUN_ID before relying on it
- Fail fast before staging large artifacts for upload
When it happens
Trigger: Running `warp artifacts upload <file>` outside an Oz runner context — OZ_RUN_ID not exported — without passing --run-id or --conversation-id.
Common situations: Local manual uploads; CI containers that don't inherit runner env; scripts assuming the runner sets the variable; running the CLI from a different shell than the agent.
Related errors
- unexpected argument '--skill' found
- expiration behavior is required
- {OZ_RUN_ID_ENV_VAR} is set but is not valid Unicode
- Failed to resolve artifact upload association for conversati
- Provider '{}' must be setup for either a team or personal ac
AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16).
Data as JSON: /api/errors/e61b704eeda3f1ee.
Report an issue: GitHub.