Skip to content

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

fix(memory): read gate generation before moving state

Steven Enamakel7cecff623090
diff --git a/crates/openhuman-core/src/memory/tool_writes.rs b/crates/openhuman-core/src/memory/tool_writes.rs
index d6a45fe828..d1740b0cbd 100644
--- a/crates/openhuman-core/src/memory/tool_writes.rs
+++ b/crates/openhuman-core/src/memory/tool_writes.rs
@@ -399,9 +399,10 @@ impl AutomaticMutation {
/// Captures authority without waiting on the engine or an active erasure.
pub(crate) fn automatic_mutation(config: &Config) -> AutomaticMutation {
let state = owner_state(config);
+ let generation = state.gate.generation();
AutomaticMutation {
state,
- generation: state.gate.generation(),
+ generation,
}
}