tinyhumansai/openhuman · error

learning_list_facets

Error message

learning_list_facets: {e:#}

What it means

Wrapped failure inside the learning_list_facets tool execute(): listing facets from the cache (memory driver read) errored after the cache was acquired. The message carries the underlying driver error chain; the tool produced no facet list.

Solutions

  1. Check the underlying memory driver error in the chain for the real cause
  2. Retry the tool call once — transient module/bus errors resolve on retry
  3. Return the error to the model as a tool failure so it can inform the user or retry
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at src/openhuman/agent/learning/tools.rs:93 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/f92ba5b11015511e. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/learning/tools.rs:93

        json!({
            "type": "object",
            "properties": {
                "class": { "type": "string", "description": "Optional class filter (style|identity|tooling|veto|goal|channel)." }
            }
        })
    }

    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
        log::debug!("[tool][learning] list_facets invoked");
        let class_filter = args
            .get("class")
            .and_then(serde_json::Value::as_str)
            .map(str::to_string);
        let cache = get_cache().await?;
        let all = cache
            .list_all()
            .await
            .map_err(|e| anyhow::anyhow!("learning_list_facets: {e:#}"))?;
        let facets: Vec<serde_json::Value> = all
            .iter()
            .filter(|f| f.state == FacetState::Active || f.state == FacetState::Provisional)
            .filter(|f| match &class_filter {
                Some(cls) => {
                    f.class.as_deref() == Some(cls.as_str())
                        || f.key.starts_with(&format!("{cls}/"))
                }
                None => true,
            })
            .map(facet_to_json)
            .collect();
        Ok(ToolResult::success(serde_json::to_string(&json!({
            "count": facets.len(),
            "facets": facets,
        }))?))
    }

View on GitHub (pinned to 7491200858)