zeroclaw-labs/zeroclaw · error

Qdrant scroll failed ({status}): {text}

Error message

Qdrant scroll failed ({status}): {text}

What it means

Inside migrate_qdrant_collection_to_v3, ZeroClaw POSTs to {base_url}/collections/{collection}/points/scroll with a filter for points whose agent_id payload is empty (the pre-v3 shape) to backfill them with agent_id = "default". This error fires when Qdrant answers the scroll with any non-2xx status; the message embeds the HTTP status code and Qdrant's response body. Common statuses: 404 (collection does not exist), 401/403 (missing/wrong api-key header), 400 (rejected filter or payload index issues).

Source

Thrown at crates/zeroclaw-config/src/schema/v2.rs:3219

        if let Some(ref offset) = next_offset {
            scroll_body["offset"] = offset.clone();
        }

        let url = format!("{base_url}/collections/{collection}/points/scroll");
        let mut req = client.request(reqwest::Method::POST, &url);
        if let Some(key) = api_key {
            req = req.header("api-key", key);
        }
        let resp = req
            .header("Content-Type", "application/json")
            .json(&scroll_body)
            .send()
            .await
            .context("[system] Qdrant V3 migration: scroll request failed")?;
        if !resp.status().is_success() {
            let status = resp.status();
            let text = resp.text().await.unwrap_or_default();
            anyhow::bail!("Qdrant scroll failed ({status}): {text}");
        }

        #[derive(serde::Deserialize)]
        struct ScrollPage {
            result: ScrollResult,
        }
        #[derive(serde::Deserialize)]
        struct ScrollResult {
            points: Vec<ScrollPoint>,
            #[serde(default)]
            next_page_offset: Option<serde_json::Value>,
        }
        #[derive(serde::Deserialize)]
        struct ScrollPoint {
            id: serde_json::Value,
        }

        let page: ScrollPage = resp

View on GitHub (pinned to 88bb9c8533)

Solutions

  1. Read the embedded status: 404 → verify the collection name and create it (or let ZeroClaw create it) before migrating
  2. 401/403 → supply/correct the Qdrant api_key so the 'api-key' header is accepted
  3. Confirm Qdrant is reachable: curl {base_url}/collections and check the target collection appears
  4. Fix base_url (scheme + host + REST port, usually 6333, no trailing slash needed) and retry the migration — it is idempotent because it only touches points lacking agent_id

Example fix

# before
[qdrant]
url = "http://localhost:7333"   # wrong port
collection = "memories_v2"

# after
[qdrant]
url = "http://localhost:6333"
collection = "zeroclaw_memories"
Defensive patterns

Strategy: validation

Validate before calling

// preflight before migrate_qdrant_collection_to_v3:
async fn qdrant_collection_reachable(client: &reqwest::Client, base: &str, coll: &str, key: Option<&str>) -> Result<bool> {
    let mut r = client.get(format!("{}/collections/{}", base.trim_end_matches('/'), coll));
    if let Some(k) = key { r = r.header("api-key", k); }
    Ok(r.send().await?.status().is_success())
}

Try / catch

if let Err(e) = migrate_qdrant_collection_to_v3(&client, &url, &coll, key).await {
    let msg = e.to_string();
    if msg.starts_with("Qdrant scroll failed") {
        eprintln!("migration preflight failed — check collection name, api key, and that Qdrant is up: {msg}");
    }
    return Err(e);
}

Prevention

When it happens

Trigger: Running the V3 migration against a base_url/collection name that does not exist in Qdrant (404); Qdrant requires an API key but api_key was None or wrong (401); the collection was created with incompatible settings so the is_empty filter is rejected (400); Qdrant cloud URL wrong or pointing at the dashboard port instead of the REST port (6333).

Common situations: Upgrading ZeroClaw to V3 memory schema while the configured Qdrant collection was renamed or never created; local Qdrant not started yet when migration runs; API key rotated in Qdrant but not in ZeroClaw config; typo in qdrant base_url or collection name.

Related errors


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/ee41f5f0ed036c2e. Report an issue: GitHub.