tinyhumansai/openhuman · error
learning_forget_facet
Error message
learning_forget_facet: {e:#} What it means
Generic wrap inside learning_forget_facet: the initial cache.get of the facet (class/key) errored at the driver level. Distinct from upsert-failed — this is the read half of the forget flow failing before the facet is marked Forgotten.
Solutions
- Inspect the underlying error chain for the memory driver failure
- Retry the forget_facet call for transient errors
- Confirm the facet exists with learning_get_facet first
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/openhuman/agent/learning/tools.rs:396 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/85da3cb8b58f69a7.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/learning/tools.rs:396
"properties": { "class": { "type": "string" }, "key": { "type": "string" } },
"required": ["class", "key"]
})
}
fn permission_level(&self) -> PermissionLevel {
PermissionLevel::Write
}
async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {
log::debug!("[tool][learning] forget_facet invoked");
let class_str = read_required_str(&args, "class")?;
let key_suffix = read_required_str(&args, "key")?;
let fk = full_key(&class_str, &key_suffix);
let cache = get_cache().await?;
let facet_json = match cache
.get(&fk)
.await
.map_err(|e| anyhow::anyhow!("learning_forget_facet: {e:#}"))?
{
Some(mut f) => {
f.user_state = UserState::Forgotten;
f.state = FacetState::Dropped;
cache
.upsert(&f)
.await
.map_err(|e| anyhow::anyhow!("learning_forget_facet: upsert failed: {e:#}"))?;
facet_to_json(&f)
}
None => serde_json::Value::Null,
};
Ok(ToolResult::success(serde_json::to_string(&json!({
"facet": facet_json,
}))?))
}
}
View on GitHub (pinned to 7491200858)