Skip to content

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

fix(tinyagents): gate cap pause dispatch guard on pause_at_cap

Steven Enamakela26f480f173e
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs
index f9b393dc12..d3b3ccb398 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs
@@ -495,7 +495,8 @@ pub(super) async fn run_turn_via_tinyagents_body(
// pause is also recorded on the turn's dispatch guard (resolved here, on
// the turn's task where the task-local is in scope) to stop a racing
// sub-agent dispatch (#5804).
- if let (Some(events), Some(handle)) = (&events, &handle) {
+ if pause_at_cap {
+ if let (Some(events), Some(handle)) = (&events, &handle) {
// Only the top-level turn's cap pause is binding on dispatch; a
// delegated child reaching its own cap is routine and must not
// stop the parent's fan-out (it still gets its advisory `Pause`).