Skip to content

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

refactor(agent): condense detached subagent carrier comments

Steven Enamakelfc677298d2ee
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs
index f5d52b767b..23eb07a4c8 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs
@@ -414,14 +414,11 @@ impl SpawnAsyncSubagentTool {
register_parent_thread_id.as_deref().unwrap_or("none")
);
let background_prompt = add_background_contract(&prompt);
- // The detached child starts on a fresh task. Its explicit carrier keeps authority, origin,
- // thread, and workspace while deliberately dropping the originating turn's accounting,
- // dispatch refusal, and cancellation. Approval/origin and workspace policy remain
- // task-local until B2h moves the security boundary onto this carrier, so propagation
- // below is a staging bridge for those two scopes only.
- // Spawned scoped: the child keeps the caller's `CoreContext` (in SaaS, the user's
- // profile), so recording its completion lands in that profile's tables and notes the
- // profile as the owner the off-task delivery subscriber resolves.
+ // The detached child's carrier keeps authority, origin, thread and workspace but drops the
+ // turn's accounting, dispatch refusal and cancellation; origin/workspace propagation below
+ // bridges until B2h. Spawned scoped, so the child keeps the caller's `CoreContext` (in SaaS
+ // the user's profile): its completion lands in that profile's tables and notes the owner
+ // the off-task delivery subscriber resolves.
let detached_run_context = detached_parent.data.child();
let mut abort_report = AbortReport::arm(progress_sink.clone(), &definition.id, &task_id);
let join = crate::core::runtime::spawn_scoped(crate::agent::turn_origin::propagate(