Skip to content

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

fix(tinyagents): include workspace in subagent owner key

Steven Enamakelc81966bd8bd8
diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
index 0708f54a83..b6b622cd1d 100644
--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
@@ -77,13 +77,18 @@ impl ToolDispatch<(), OpenHumanRunContext> for LiveToolContextDispatch {
/// absent thread from the literal `"no-thread"` and handles delimiters in any
/// value.
pub(crate) fn subagent_owner_key(
- _workspace: &std::path::Path,
+ workspace: &std::path::Path,
parent_session: &str,
thread_id: Option<&str>,
) -> String {
format!(
"openhuman-subagent-owner:{}",
- serde_json::to_string(&(parent_session, thread_id)).unwrap_or_else(|_| "null".into())
+ serde_json::to_string(&(
+ workspace.as_os_str().as_encoded_bytes(),
+ parent_session,
+ thread_id,
+ ))
+ .expect("owner scope tuple is always JSON serializable")
)
}