Skip to content

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

fix(web_chat): handle progress bridge errors gracefully

Steven Enamakele04e73e09c4f
diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rs
index e454a023d3..3d003e35a3 100644
--- a/crates/openhuman-core/src/tools/ops.rs
+++ b/crates/openhuman-core/src/tools/ops.rs
@@ -7,9 +7,7 @@ use crate::runtime::python::PythonBootstrap;
use crate::security::{AuditLogger, SecurityPolicy};
use std::collections::HashMap;
use std::sync::Arc;
-use tinyagents_harness::tools::{
- AskClarificationTool, CurrentTimeTool, ResolveTimeTool, WaitLoopTool, WaitTool,
-};
+use tinyagents_harness::tools::{self as harness_tools, CurrentTimeTool, ResolveTimeTool};
use tinytools::Tool;
#[cfg(test)]
use tinytools::{ToolResult, ToolSpec};
@@ -195,7 +193,7 @@ pub fn all_tools_with_runtime(
// Several agent scopes (orchestrator, crypto, markets, scheduler,
// desktop control) name it, so it must exist in the base
// registry or none of them can actually ask the user anything.
- Box::new(AskClarificationTool::new()),
+ Box::new(harness_tools::AskClarificationTool::new()),
// Read-only project overview (git status, recent commits, top-level
// tree) rooted at the agent action dir. Named by the orchestrator and
// planner scopes.
@@ -204,8 +202,8 @@ pub fn all_tools_with_runtime(
// durable `subagent_session_id` (preferred) or transient `task_id`.
Box::new(ListSubagentsTool::new()),
Box::new(SteerSubagentTool::new()),
- Box::new(WaitTool::new()),
- Box::new(WaitLoopTool::new()),
+ Box::new(harness_tools::WaitTool::new()),
+ Box::new(harness_tools::WaitLoopTool::new()),
Box::new(WaitSubagentTool::new()),
Box::new(CloseSubagentTool::new()),
Box::new(ContinueSubagentTool::new()),
diff --git a/crates/openhuman-core/src/web_chat/progress_bridge.rs b/crates/openhuman-core/src/web_chat/progress_bridge.rs
index 552a68c759..79307ff20d 100644
--- a/crates/openhuman-core/src/web_chat/progress_bridge.rs
+++ b/crates/openhuman-core/src/web_chat/progress_bridge.rs
@@ -379,13 +379,11 @@ pub(crate) fn spawn_progress_bridge(
|| config.observability.agent_tracing.enabled
{
use crate::agent::progress_tracing::SpanCollector;
- use tinyagents_harness::observability::trace_export::{
- trace_session_id, RunType, TraceContext,
- };
+ use tinyagents_harness::observability::trace_export::{self as te, RunType, TraceContext};
// One trace per turn: the trace id is unique per request, while the
// thread id rides along as the Langfuse `sessionId` so a
// conversation's per-turn traces still group under one session.
- let base = trace_session_id(metadata.session_id, &thread_id);
+ let base = te::trace_session_id(metadata.session_id, &thread_id);
let trace_id = format!("{base}:{request_id}");
// Attribute the trace to the *real* authenticated user (cached
// stored credential identity: id, else email) — the transport client