Skip to content

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

feat(tinyagents): add headless descendant settlement flag

Steven Enamakel046851fab15a
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
index 1fd2144368..4879ca2e92 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
@@ -316,6 +316,9 @@ pub struct OpenHumanRunContext {
pub file_state_agent_id: Option<String>,
/// Host-owned artifact index for tool-result references.
pub(crate) tool_result_artifact_index: Option<Arc<ToolResultArtifactIndexStore>>,
+ /// This root run owns settlement of driver jobs before its host turn
+ /// returns. Inherited by recursive child contexts, never by ordinary chat.
+ pub(crate) headless_descendant_settlement: bool,
/// Current-turn attachment placeholders forwarded to vision delegates.
pub attachment_placeholders: Arc<Vec<String>>,
/// Dispatch guard shared by synchronous delegates in this run.
@@ -452,6 +455,7 @@ impl OpenHumanRunContext {
transcripts: None,
file_state_agent_id: None,
tool_result_artifact_index: None,
+ headless_descendant_settlement: false,
attachment_placeholders: Arc::new(Vec::new()),
dispatch: None,
task_recency_window: None,
@@ -498,6 +502,13 @@ impl OpenHumanRunContext {
self
}
+ /// Marks an opted-in headless root whose host will settle driver jobs.
+ #[must_use]
+ pub(crate) fn with_headless_descendant_settlement(mut self) -> Self {
+ self.headless_descendant_settlement = true;
+ self
+ }
+
/// The dispatch context this run's readers use: its own `core`, else the
/// calling task's (a run assembled by a caller that did not bind one).
pub fn dispatch_ctx(&self) -> crate::core::runtime::DispatchCtx {