tinyhumansai/openhuman · error · anyhow::Error

memory_store_raw_chunks: limit must be between 1 and 1000

Error message

memory_store_raw_chunks: limit must be between 1 and 1000

What it means

Range validation in the memory_store_raw_chunks tool's execute: the `limit` argument, if provided, was outside 1–1000 (the schema declares minimum 1, maximum 1000). Fires after deserialization and SourceKind parsing, before the driver query; re-issue with a limit in range or omit it for the default 100.

Source

Thrown at src/openhuman/memory/tools/raw_store/raw_chunks.rs:87

        let parsed: Args = serde_json::from_value(args)
            .map_err(|e| anyhow::anyhow!("invalid arguments for memory_store_raw_chunks: {e}"))?;
        log::debug!(
            "[tool][memory_store] raw_chunks source_kind={:?} owner={:?} tags={:?} limit={:?}",
            parsed.source_kind,
            parsed.owner,
            parsed.tags_all_of,
            parsed.limit
        );
        let source_kind = match parsed.source_kind.as_deref() {
            Some(s) => Some(
                SourceKind::parse(s)
                    .map_err(|e| anyhow::anyhow!("memory_store_raw_chunks: {e}"))?,
            ),
            None => None,
        };
        if let Some(limit) = parsed.limit {
            if !(1..=1000).contains(&limit) {
                return Err(anyhow::anyhow!(
                    "memory_store_raw_chunks: limit must be between 1 and 1000"
                ));
            }
        }
        // The per-profile memory-source gate is applied inside `list_chunks`
        // (before the row limit). None = unrestricted.
        let query = ChunkQuery {
            source_kind,
            source_id: parsed.source_id,
            owner: parsed.owner,
            since_ms: parsed.since_ms,
            until_ms: parsed.until_ms,
            limit: parsed.limit,
            offset: None,
            exclude_dropped: false,
        };
        let guard = active_memory_guard()
            .await

View on GitHub (pinned to 7491200858)

Solutions

  1. Set limit between 1 and 1000 (default 100)
  2. Omit limit to use the default
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/memory/tools/raw_store/raw_chunks.rs:87 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/9d5970cac070ad22. Report an issue: GitHub.