tinyhumansai/openhuman · error
learning_rebuild_cache: rebuild failed
Error message
learning_rebuild_cache: rebuild failed: {e:#} What it means
learning_rebuild_cache ran the StabilityDetector rebuild over all facets and it errored partway — a driver read/write failure during the recomputation of facet states. The cache is left in its pre-rebuild state.
Solutions
- Retry the rebuild — it recomputes from current facet state and is idempotent
- Check memory driver/module health in the error chain
- Run learning_cache_stats afterwards to confirm the rebuilt state
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/openhuman/agent/learning/tools.rs:449 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/6c9efbb26ada74dd.
Report an issue: GitHub.
Appendix: source
Thrown at src/openhuman/agent/learning/tools.rs:449
json!({ "type": "object", "properties": {} })
}
fn permission_level(&self) -> PermissionLevel {
PermissionLevel::Execute
}
async fn execute(&self, _args: serde_json::Value) -> anyhow::Result<ToolResult> {
log::debug!("[tool][learning] rebuild_cache invoked");
let cache = get_cache().await?;
let detector = StabilityDetector::new(cache);
let now = SystemTime::now()
.duration_since(UNIX_EPOCH)
.map(|d| d.as_secs_f64())
.unwrap_or(0.0);
let outcome = detector
.rebuild(now)
.await
.map_err(|e| anyhow::anyhow!("learning_rebuild_cache: rebuild failed: {e:#}"))?;
Ok(ToolResult::success(serde_json::to_string(&json!({
"added": outcome.added,
"evicted": outcome.evicted,
"kept": outcome.kept,
"total_size": outcome.total_size,
}))?))
}
}
/// Reset the facet cache (delete all auto facets, keep pinned). Default-OFF.
pub struct LearningResetCacheTool;
#[async_trait]
impl Tool for LearningResetCacheTool {
fn name(&self) -> &str {
"learning_reset_cache"
}
View on GitHub (pinned to 7491200858)