Skip to content

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

docs(voice): explain why the live session scopes its tool worker

Steven Enamakel7d0b56a045df
diff --git a/crates/openhuman-core/src/voice/live/session.rs b/crates/openhuman-core/src/voice/live/session.rs
index 81046c89df..467d6244ba 100644
--- a/crates/openhuman-core/src/voice/live/session.rs
+++ b/crates/openhuman-core/src/voice/live/session.rs
@@ -182,6 +182,11 @@ pub(crate) async fn start(
.unwrap_or_else(|| format!("voice-live-{session_id}")),
request_id: None,
};
+ // The approval gate still reads the turn origin and chat context from
+ // task-locals (an unlabelled call is treated as `Unknown` and denied), so
+ // the tool worker — a spawned task — must be scoped explicitly. Baselined
+ // in `agent-runtime-boundary-baseline.json` with the other entry points
+ // until the gate reads the origin from the run context.
let scope: TaskScope = Arc::new(move |task| {
let origin = origin.clone();
let approval = approval.clone();
diff --git a/scripts/ci/agent-runtime-boundary-baseline.json b/scripts/ci/agent-runtime-boundary-baseline.json
index 76814be0e8..41f098fecb 100644
--- a/scripts/ci/agent-runtime-boundary-baseline.json
+++ b/scripts/ci/agent-runtime-boundary-baseline.json
@@ -940,7 +940,7 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/voice/live/session.rs",
- "line": 188,
+ "line": 193,
"text": "Box::pin(with_origin(",
"occurrence": 1
},