Skip to content

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

refactor(agent): drop unused bindings and set run context directly

Steven Enamakeld0bd3a4a0a53
diff --git a/crates/openhuman-core/src/agent/session_host/driver.rs b/crates/openhuman-core/src/agent/session_host/driver.rs
index 10cfd307c8..d065925c8f 100644
--- a/crates/openhuman-core/src/agent/session_host/driver.rs
+++ b/crates/openhuman-core/src/agent/session_host/driver.rs
@@ -401,7 +401,7 @@ impl SessionDriver<OpenHumanRunContext> for OpenHumanSessionDriver {
// second history or transcript. The runtime only reads it from
// `after_commit`, so a failed/cancelled turn cannot publish its usage
// or tool outcomes as if they had become durable.
- let terminal_stop = {
+ {
// Always billed: a repair that timed out after its call answered
// still recorded that call here.
let repair_usage = Some(&repair_usage);
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs
index bfa5f695b6..1b1bc14b71 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests_driver_bridge_tests.rs
@@ -79,9 +79,9 @@ async fn prepared_child_run_is_exported_from_its_native_journal_lineage() {
let provider = ScriptedProvider::new(vec![response]);
let mut parent_context = make_parent(provider.clone(), vec![]);
parent_context.workspace_dir = workspace.clone();
- parent_context.core = Some(Arc::downgrade(&core));
- parent_context.thread_id = Some("native-trace-thread".into());
- let options = with_parent(parent_context, SubagentRunOptions::default());
+ let mut options = with_parent(parent_context, SubagentRunOptions::default());
+ options.run_context = options.run_context.with_core(Some(Arc::clone(&core)));
+ options.run_context.thread_id = Some("native-trace-thread".into());
let root_config = tinyagents_harness::context::RunConfig::new("native-trace-root")
.with_thread("native-trace-thread");
let root_run_id = root_config.run_id.clone();
diff --git a/crates/openhuman-core/src/web_chat/progress_bridge.rs b/crates/openhuman-core/src/web_chat/progress_bridge.rs
index 76cdaca9e1..f6f63f689e 100644
--- a/crates/openhuman-core/src/web_chat/progress_bridge.rs
+++ b/crates/openhuman-core/src/web_chat/progress_bridge.rs
@@ -277,7 +277,7 @@ pub(crate) fn spawn_progress_bridge(
TurnStateMirror::new(turn_state_store, thread_id.clone(), request_id.clone());
// #3886: structured tracing export (`progress_bridge_trace.rs`).
- let journal_trace_ctx =
+ let mut journal_trace_ctx =
trace::trace_context(&config, &metadata, &client_id, &thread_id, &request_id);
// #4270: emit a periodic liveness beat for the whole in-flight turn so