tinyhumansai/openhuman · error

memory_tree_drill_down: max_depth must be >= 1

Error message

memory_tree_drill_down: max_depth must be >= 1

What it means

Semantic guard on drill_down args: max_depth was provided but is zero (or negative after parsing). The tree walk requires at least one level; the check runs immediately after parsing, before the driver is touched.

Source

Thrown at src/openhuman/memory/query/drill_down.rs:55

                    "type": "string",
                    "description": "Optional natural-language query — when set, children are reranked by cosine similarity."
                },
                "limit": {
                    "type": "integer",
                    "minimum": 0,
                    "description": "Optional cap on returned hits, applied after rerank."
                }
            },
            "required": ["node_id"]
        })
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][memory_tree] drill_down invoked");
        let req: DrillDownRequest = serde_json::from_value(args)
            .map_err(|e| anyhow::anyhow!("invalid arguments for memory_tree_drill_down: {e}"))?;
        if matches!(req.max_depth, Some(0)) {
            return Err(anyhow::anyhow!(
                "memory_tree_drill_down: max_depth must be >= 1"
            ));
        }
        let hits = backend::drill_down(
            &req.node_id,
            req.max_depth.unwrap_or(1),
            req.query.as_deref(),
            req.limit,
        )
        .await?;
        log::debug!(
            "[tool][memory_tree] drill_down returning hits={}",
            hits.len()
        );
        let json = serde_json::to_string(&hits)?;
        Ok(ToolResult::success(json))
    }
}

View on GitHub (pinned to 7491200858)

Solutions

  1. Set max_depth to 1 or higher
  2. Omit max_depth to use the default depth
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/memory/query/drill_down.rs:55 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/cecf661df22a3259. Report an issue: GitHub.