Skip to content

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

fix(chat): handle empty message in chat service

Steven Enamakeld20ee4c8207a
diff --git a/app/src/services/chatService.ts b/app/src/services/chatService.ts
index 544eb46e13..5d89f7be96 100644
--- a/app/src/services/chatService.ts
+++ b/app/src/services/chatService.ts
@@ -634,6 +634,22 @@ export interface SubagentProgressDetail {
output_tokens?: number;
cached_input_tokens?: number;
cost_usd?: number;
+ /**
+ * Provider-assigned id of the `spawn_subagent`/`spawn_async_subagent`/
+ * `delegate_*` tool call that started this delegation
+ * (`AgentProgress::SubagentSpawned::parent_call_id`, threaded onto every
+ * event in the `subagent_*` family — see `crates/openhuman-core/src/core/socketio.rs`).
+ * Lets the frontend attach the delegation's live activity to the EXACT
+ * spawn tool-call part instead of guessing which running row started it.
+ * Absent on cores that predate this field.
+ */
+ parent_call_id?: string;
+ /**
+ * The sub-agent's final assistant text (on `subagent_completed`), capped by
+ * the core (`cap_wire_output`). Rendered as the delegation's nested
+ * transcript result.
+ */
+ output?: string;
}
/** Extended payload for `subagent_spawned`. */
diff --git a/crates/openhuman-core/src/web_chat/ops.rs b/crates/openhuman-core/src/web_chat/ops.rs
index 3872dd58b9..08aeb01a3b 100644
--- a/crates/openhuman-core/src/web_chat/ops.rs
+++ b/crates/openhuman-core/src/web_chat/ops.rs
@@ -23,7 +23,7 @@ pub use channel_ops::{
channel_web_queue_remove, channel_web_queue_status,
};
-pub use start_chat::start_chat;
+pub use start_chat::{start_chat, StartChatError};
pub use system_turn::{run_system_turn_on_thread, SESSION_CHECKOUT_FAILURE, SYSTEM_CLIENT_ID};
#[cfg(test)]