Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(agent): ensure history reset on session setup

Steven Enamakel15a1608e1eb7
diff --git a/crates/openhuman-core/src/agent/host_agents.rs b/crates/openhuman-core/src/agent/host_agents.rs
index 7c3226627b..d39163380e 100644
--- a/crates/openhuman-core/src/agent/host_agents.rs
+++ b/crates/openhuman-core/src/agent/host_agents.rs
@@ -148,7 +148,9 @@ impl HostAgent {
let mut session = self.session_host(&self.config, Some(session_key))?;
session.set_thread_id(Some(session_key));
session.set_event_context(event_session_id, channel);
- self.scope(session.reset_bound_history()).await
+ let reset = self.scope(session.reset_bound_history()).await?;
+ anyhow::ensure!(reset, "durable channel session has no resettable history");
+ Ok(true)
}
/// Build a session for this agent from `config` -- normally a clone of