tinyhumansai/openhuman · error
: re-read failed
Error message
{tool}: re-read failed: {e:#} What it means
After a successful set_user_state in the pin/unpin helper, re-reading the facet to render the tool result failed — a driver read error on the verification pass. The state change likely landed but the tool could not confirm/show it.
Solutions
- Retry the read (learning_get_facet) to confirm the new state
- Treat the pin/unpin as probably applied and verify rather than assuming failure
- Check driver health if re-reads keep failing
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/openhuman/agent/learning/tools.rs:290 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/1f452668d790a3c7.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/learning/tools.rs:290
args: serde_json::Value,
tool: &str,
state: UserState,
) -> anyhow::Result<ToolResult> {
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 updated = cache
.set_user_state(&fk, state)
.await
.map_err(|e| anyhow::anyhow!("{tool}: set_user_state failed: {e:#}"))?;
if !updated {
return Err(anyhow::anyhow!("{tool}: facet not found: {fk}"));
}
let facet = cache
.get(&fk)
.await
.map_err(|e| anyhow::anyhow!("{tool}: re-read failed: {e:#}"))?;
Ok(ToolResult::success(serde_json::to_string(&json!({
"facet": facet.as_ref().map(facet_to_json),
}))?))
}
/// Pin a facet. Default-OFF.
pub struct LearningPinFacetTool;
#[async_trait]
impl Tool for LearningPinFacetTool {
fn name(&self) -> &str {
"learning_pin_facet"
}
fn description(&self) -> &str {
"Pin a learned facet (`class` + `key`) so it stays active regardless of \
the stability detector."
}View on GitHub (pinned to 7491200858)