Skip to content

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

fix(agent): report iteration cap only on cap

Steven Enamakeladde9228e199
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session.rs b/crates/openhuman-core/src/agent/session_host/runtime_session.rs
index 48e359656d..f5790e2885 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs
@@ -1673,7 +1673,6 @@ impl OpenHumanSessionHost {
.unwrap_or_else(std::sync::PoisonError::into_inner)
.clone();
let usage = holistic_last_turn_usage(&sidecar);
- let interrupted = sidecar.hit_cap || receipt.outcome.interrupted;
let tool_calls = sidecar
.tool_outcomes
.iter()
@@ -1731,7 +1730,7 @@ impl OpenHumanSessionHost {
let mut state = state
.lock()
.unwrap_or_else(|poisoned| poisoned.into_inner());
- state.last_turn_hit_cap = interrupted;
+ state.last_turn_hit_cap = sidecar.hit_cap;
state.last_turn_usage = Some(usage);
state.last_turn_citations = citations;
}
diff --git a/scripts/ci/check-openhuman-rust-layout.mjs b/scripts/ci/check-openhuman-rust-layout.mjs
index ddf064cc68..92dbf0bd46 100644
--- a/scripts/ci/check-openhuman-rust-layout.mjs
+++ b/scripts/ci/check-openhuman-rust-layout.mjs
@@ -38,7 +38,7 @@ const LEGACY_LIMIT_ENTRIES = [
// under the general 750 limit, so it needs no exception at all.
// The session-todo integration added transcript metadata construction to
// this already-exempt composition seam. Keep its allowance exact.
- ["crates/openhuman-core/src/agent/session_host/runtime_session.rs", 1903],
+ ["crates/openhuman-core/src/agent/session_host/runtime_session.rs", 1902],
// Session-host factory still assembles the product's deliberately coupled
// provider, security, memory, tool and prompt policy. Generic session
// state moved to tinyagents-runtime; this remaining composition is split in