Skip to content

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

fix(socketio): pass dispatch context to web chat start

Steven Enamakel4f2327531771
diff --git a/crates/openhuman-rpc/src/server/socketio.rs b/crates/openhuman-rpc/src/server/socketio.rs
index 34d287499a..f85ac22aa8 100644
--- a/crates/openhuman-rpc/src/server/socketio.rs
+++ b/crates/openhuman-rpc/src/server/socketio.rs
@@ -417,6 +417,8 @@ pub fn attach_socketio() -> (socketioxide::layer::SocketIoLayer, SocketIo) {
// Trigger the web channel's chat logic.
match crate::core_host::web_chat::start_chat(
+ // Outside SaaS the host's one context; in SaaS the socket task's own scope.
+ &crate::core_host::core::runtime::DispatchCtx::host_default(),
&client_id,
&payload.thread_id,
&payload.message,