Skip to content

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

fix(session_host): correct builder factory module path

Steven Enamakel3260e7eb008c
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 bb731ff434..16a043c19e 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -761,6 +761,12 @@ impl OpenHumanSessionHost {
&mut visible,
config.context.compaction_enabled || super::summarizes_tool_output(agent_id, config),
);
+ // The handle preview names the REPL tools; a curated belt needs them
+ // too, for exactly as long as they are registered.
+ super::ensure_repl_tools_visible(
+ &mut visible,
+ crate::inference::tokenjuice::repl_handle_active(config),
+ );
if let Some(def) = target_def {
if !def.disallowed_tools.is_empty() {
diff --git a/crates/openhuman-core/src/agent/session_host/builder/mod.rs b/crates/openhuman-core/src/agent/session_host/builder/mod.rs
index 5ef8af2a48..f1f39b1780 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/mod.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/mod.rs
@@ -209,6 +209,26 @@ pub(super) fn ensure_recovery_tool_visible(
}
}
+/// Ensure the REPL tools (`juice_find`, `juice_extract`, `juice_summarize`) are
+/// members of a non-empty visibility allowlist while large results are stored
+/// behind a handle. The handle preview names them, so a curated
+/// `ToolScope::Named` belt that lacked them would be told to call a tool it
+/// cannot see. Same rules as [`ensure_recovery_tool_visible`]: an empty set
+/// means "no filter", and a zero-tool belt stays zero-tool.
+pub(super) fn ensure_repl_tools_visible(
+ visible: &mut std::collections::HashSet<String>,
+ handle_mode_active: bool,
+) {
+ if !handle_mode_active {
+ return;
+ }
+ if !crate::agent::harness::definition::is_empty_tool_scope(visible) {
+ for name in crate::inference::tokenjuice::REPL_TOOL_NAMES {
+ visible.insert((*name).to_string());
+ }
+ }
+}
+
/// Whether TinyJuice may summarize this agent's tool output. Only the
/// orchestrator gets a summary model, and a zero threshold turns it off.
pub(super) fn summarizes_tool_output(agent_id: &str, config: &crate::config::Config) -> bool {