tinyhumansai/openhuman · error
learning_update_facet
Error message
learning_update_facet: {e:#} What it means
Generic wrap inside learning_update_facet execute(): an error escaped after argument validation — most often the initial cache.get of the facet or config/cache acquisition failing. The chain distinguishes it from the not-found and upsert-failed cases.
Solutions
- Read the underlying error chain to find whether get or another step failed
- Check memory driver health and retry the tool call
- Verify the facet exists first with learning_get_facet
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/openhuman/agent/learning/tools.rs:256 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/14f6789e1c12a2fd.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/learning/tools.rs:256
"required": ["class", "key", "value"]
})
}
fn permission_level(&self) -> PermissionLevel {
PermissionLevel::Write
}
async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
log::debug!("[tool][learning] update_facet invoked");
let class_str = read_required_str(&args, "class")?;
let key_suffix = read_required_str(&args, "key")?;
let value = read_required_str(&args, "value")?;
let fk = full_key(&class_str, &key_suffix);
let cache = get_cache().await?;
let mut facet = cache
.get(&fk)
.await
.map_err(|e| anyhow::anyhow!("learning_update_facet: {e:#}"))?
.ok_or_else(|| anyhow::anyhow!("learning_update_facet: facet not found: {fk}"))?;
facet.value = value;
facet.user_state = UserState::Pinned;
cache
.upsert(&facet)
.await
.map_err(|e| anyhow::anyhow!("learning_update_facet: upsert failed: {e:#}"))?;
Ok(ToolResult::success(serde_json::to_string(&json!({
"facet": facet_to_json(&facet),
}))?))
}
}
/// Set/clear a facet's pin via `set_user_state`. Shared by pin/unpin.
async fn set_pin(
args: serde_json::Value,
tool: &str,
state: UserState,View on GitHub (pinned to 7491200858)