Skip to content

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

fix(progress_bridge): replace manual throttle with turn_cost_throttle

Steven Enamakel3c596bb5a147
diff --git a/crates/openhuman-core/src/web_chat/progress_bridge.rs b/crates/openhuman-core/src/web_chat/progress_bridge.rs
index b87f600b16..cd7188e8da 100644
--- a/crates/openhuman-core/src/web_chat/progress_bridge.rs
+++ b/crates/openhuman-core/src/web_chat/progress_bridge.rs
@@ -1490,11 +1490,7 @@ pub(crate) fn spawn_progress_bridge(
// `subagents` stays empty here; the final `chat_done.usage`
// (built from `LastTurnUsage` at delivery) is still where
// sub-agent attribution shows up.
- let should_emit_turn_cost = last_turn_cost_emit
- .map(|at| at.elapsed() >= TURN_COST_EMIT_MIN_INTERVAL)
- .unwrap_or(true);
- if should_emit_turn_cost {
- last_turn_cost_emit = Some(std::time::Instant::now());
+ if turn_cost_throttle.should_emit() {
publish_seq_stamped(
&mut emit_seq,
WebChannelEvent {