Skip to content

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

docs(agent): clarify parent context propagation comments

Steven Enamakel56a793266332
diff --git a/crates/openhuman-core/src/agent/harness/fork_context.rs b/crates/openhuman-core/src/agent/harness/fork_context.rs
index ea4f8af30b..5139e8fee5 100644
--- a/crates/openhuman-core/src/agent/harness/fork_context.rs
+++ b/crates/openhuman-core/src/agent/harness/fork_context.rs
@@ -5,9 +5,9 @@
//! A [`ParentExecutionContext`] travels explicitly: the parent
//! [`crate::agent::OpenHumanSessionHost`] attaches it to its turn's
//! [`OpenHumanRunContext`](crate::agent::tinyagents::host::OpenHumanRunContext)
-//! (`parent`), tools read it from there, and triage escalation builds its root parent with
-//! [`crate::triage::parent_context::build_root_parent`] and pass it
-//! to the spawns they make. There is no ambient copy.
+//! (`parent`), tools read it from there, and triage escalation uses
+//! [`crate::triage::parent_context::build_root_parent`] before passing the result
+//! to its spawns. There is no ambient copy.
//!
//! Stashed in `Arc`s so cloning into a child costs a refcount bump
//! rather than a full copy.
diff --git a/crates/openhuman-core/src/triage/parent_context.rs b/crates/openhuman-core/src/triage/parent_context.rs
index f74546c319..f12c63d36b 100644
--- a/crates/openhuman-core/src/triage/parent_context.rs
+++ b/crates/openhuman-core/src/triage/parent_context.rs
@@ -33,8 +33,8 @@ pub(crate) async fn build_root_parent(
) -> Result<ParentExecutionContext> {
// Sub-agent spawns resolve their definition through the global
// agent-definition registry, so it MUST be initialised before any spawn.
- // The full runtime boot (`bootstrap_core_runtime`) does this, but these
- // Triage can also be reached from contexts that only built the HTTP router
+ // The full runtime boot (`bootstrap_core_runtime`) does this, but triage can
+ // also be reached from contexts that only built the HTTP router
// (e.g. the JSON-RPC e2e harness) — so init defensively here. `OnceLock`
// makes this idempotent: a no-op when the registry is already loaded.
if crate::agent_registry::host_definition::AgentDefinitionRegistry::global().is_none() {