warpdotdev/warp · error · anyhow::Error

Failed to resolve artifact upload association for conversati

Error message

Failed to resolve artifact upload association for conversation '{}': {conversation_err}; also failed to use {OZ_RUN_ID_ENV_VAR}: {env_err}

What it means

Composite association failure: the explicit `--conversation-id` path failed (conversation metadata lacked or rejected a cloud task id — the `{conversation_err}` part), and the OZ_RUN_ID fallback simultaneously failed (`{env_err}`: unset, non-UTF-8, or unparseable). Both association sources are exhausted, so the artifact cannot be attached to any cloud task.

Source

Thrown at app/src/ai/agent_sdk/artifact_upload.rs:364

                });
            }
            Err(conversation_err) => {
                let env_err = match resolve_env_run_id(env_run_id) {
                    Ok(ambient_task_id) => {
                        log::warn!(
                            "Conversation '{}' task resolution failed ({conversation_err}); falling back to {OZ_RUN_ID_ENV_VAR} for ambient task context",
                            conversation_id.as_str()
                        );
                        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,
    })

View on GitHub (pinned to e72fd7aacb)

Solutions

  1. Pass an explicit `--run-id <ambient task id>` — it is authoritative and skips both failing paths
  2. Fix OZ_RUN_ID (export the valid task id) so the fallback works
  3. Verify the conversation id belongs to a cloud agent run on the current server/workspace
  4. Read both sub-errors in the message: they name the two independent causes

Example fix

# before
warp artifacts upload --conversation-id abc123 out.tgz   # OZ_RUN_ID unset
# after
warp artifacts upload --run-id <ambient-task-id> out.tgz
Defensive patterns

Strategy: fallback

Validate before calling

// Prefer an explicit --run-id: it is authoritative and bypasses both the
// conversation-metadata and OZ_RUN_ID paths that produce this composite error.
fn pick_association(run_id: Option<String>, env_run_id: Option<String>) -> Option<String> {
    run_id.or(env_run_id)
}

Try / catch

match resolve_upload_association_from_sources(run_id, conv_id, conv_task, env_run_id) {
    Ok assoc => assoc,
    Err(e) => {
        // Both sources failed: re-run with an explicit --run-id instead of retrying blind
        re_request_explicit_run_id(e)
    }
}

Prevention

When it happens

Trigger: Artifact upload with --conversation-id whose metadata has no ambient_agent_task_id (or whose conversation lookup failed) while OZ_RUN_ID is also unset/invalid at the same time.

Common situations: Manual uploads outside a runner (no OZ_RUN_ID) against a local-origin conversation; CI jobs that scrub the env; the conversation was deleted or belongs to another workspace.

Related errors


AI-assisted analysis of warpdotdev/warp@e72fd7aacb (2026-08-16). Data as JSON: /api/errors/862279988bcba9e9. Report an issue: GitHub.