Skip to content

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

fix(session_host): gate memory prompt sections on post-pack visible set

Steven Enamakel95ef609f2f14
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
index c7eff27bdd..c08a443b17 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -784,11 +784,20 @@ impl OpenHumanSessionHost {
// Memory prompt sections — the read side (#566) and the write side
// (#6048); both gates live in `helpers::add_memory_prompt_sections`.
+ // Gated on the set the model will actually see: packs are stripped
+ // from `visible` later in the build, and gating on the pre-strip set
+ // told the orchestrator to call `save_preference` while the pack held
+ // it off the wire.
+ let visible_after_packs = {
+ let mut after = visible.clone();
+ crate::tools::toolpacks::strip_packed_from_visible(&mut after, agent_id);
+ after
+ };
prompt_builder = super::helpers::add_memory_prompt_sections(
prompt_builder,
&tools,
&delegation_tools,
- &visible,
+ &visible_after_packs,
agent_id,
);