tinyhumansai/openhuman · error
memory_tools_put: stored rule {rule_id} not found on read-ba
Error message
memory_tools_put: stored rule {rule_id} not found on read-back What it means
After `put_tool_rule` reported success, reading the stored rule back by its generated id found no matching entry. The tool's contract is to return the normalized stored rule, so this consistency-check failure indicates the write was not durably visible — a store/module coherence fault (different connection, transaction visibility, or id mismatch), not a caller input problem.
Source
Thrown at src/openhuman/memory/tools/tool_memory/put.rs:134
);
rule.tags = parsed.tags;
let rule_id = rule.id.clone();
let tool_name = rule.tool_name.clone();
family
.put_tool_rule(rule)
.await
.map_err(|e| anyhow::anyhow!("memory_tools_put: {e}"))?;
// `put_tool_rule` answers with unit; the tool's contract is the stored
// rule (normalised tool_name, preserved created_at, refreshed
// updated_at), so read it back by the id generated above.
let stored = family
.tool_rules(&tool_name)
.await
.map_err(|e| anyhow::anyhow!("memory_tools_put: {e}"))?
.into_iter()
.find(|r| r.id == rule_id)
.ok_or_else(|| {
anyhow::anyhow!("memory_tools_put: stored rule {rule_id} not found on read-back")
})?;
log::debug!(
"[tool][memory_tools] put via guard tool_name={} id={} read_back=ok",
stored.tool_name,
stored.id
);
let json = serde_json::to_string(&stored)?;
Ok(ToolResult::success(json))
}
}
#[cfg(test)]
mod tests {
use super::*;
use std::ffi::OsString;
use tempfile::TempDir;
View on GitHub (pinned to 7491200858)
Solutions
- Retry the put — visibility races can be transient
- Check store health and whether the module and host disagree on connections
- Inspect the generated rule_id format vs what the store indexes
- Report as a module/store bug if persistent
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at src/openhuman/memory/tools/tool_memory/put.rs:134 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/99edd5a6334ae1de.
Report an issue: GitHub.