Skip to content

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

feat(agent): track turn origin for memory tool calls

Steven Enamakelf8585be03470
diff --git a/crates/openhuman-core/src/agent/turn_origin.rs b/crates/openhuman-core/src/agent/turn_origin.rs
index 0dc1b36c0b..e95b1322d4 100644
--- a/crates/openhuman-core/src/agent/turn_origin.rs
+++ b/crates/openhuman-core/src/agent/turn_origin.rs
@@ -296,7 +296,7 @@ pub async fn with_inherited_origin<F: std::future::Future>(
/// calls reaches the approval gate as [`AgentTurnOrigin::Unknown`] and is
/// refused — even though the parent turn that delegated the work was properly
/// labelled. That is the same failure mode
-/// [`fork_context::with_parent_context`](crate::agent::harness::fork_context)
+/// the parent `ParentExecutionContext`
/// and an explicit [`OpenHumanRunContext`](crate::agent::tinyagents::host::OpenHumanRunContext)
/// already re-install explicitly at those spawn sites; the origin is the third
/// thing that has to travel with them.
diff --git a/crates/openhuman-core/src/memory/tools.rs b/crates/openhuman-core/src/memory/tools.rs
index b632e4fb0a..6c7b726686 100644
--- a/crates/openhuman-core/src/memory/tools.rs
+++ b/crates/openhuman-core/src/memory/tools.rs
@@ -147,7 +147,7 @@ impl CallFacts {
let identity = super::scope::current().unwrap_or_else(|| {
// Outside a scoped turn (a legacy driver), fall back to the
// parent context's agent, else the root.
- crate::agent::tinyagents::host::parent_agent_id_for_tool(context)
+ crate::agent::tinyagents::host::run_context::parent_agent_id_for_tool(context)
.map_or_else(super::scope::MemoryIdentity::root, |parent_agent_id| {
super::scope::MemoryIdentity::agent(&parent_agent_id)
})