The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
fix(subagent-host): prefer cached observer cancellation over leader record
Steven Enamakela23057d76f16
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle/driver_result.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle/driver_result.rsindex 066e46d2da..3cd0cafe09 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle/driver_result.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle/driver_result.rs@@ -39,6 +39,18 @@ pub(crate) async fn resolve_inline_driver_outcome(.unwrap_or_else(|poisoned| poisoned.into_inner()).remove(task_key);+ // TinyAgents returns an observer's cancellation independently from the+ // leader's durable lifecycle. The leader may commit after this observer+ // receives its cancellation but before this adapter reads persistence.+ // In that race, the explicit observer result remains authoritative for+ // this invocation; consulting the leader's record would turn cancellation+ // into a status mismatch and a provider error.+ if let Some(outcome) = cached.as_ref().filter(|host| {+ host.persistence_disposition == SubagentPersistenceDisposition::ObserverCancelled+ }) {+ return Ok((outcome.clone(), public_job_id));+ }+// The driver's persistence CAS result is authoritative. Another// invocation can win terminal/pause persistence while this executor's// host-side cache still contains its local loser. Read the same scoped@@ -94,11 +106,6 @@ pub(crate) async fn resolve_inline_driver_outcome(return Ok((host, public_job_id));}- if let Some(outcome) = cached.filter(|host| {- host.persistence_disposition == SubagentPersistenceDisposition::ObserverCancelled- }) {- return Ok((outcome, public_job_id));- }Err(SubagentRunError::Provider(anyhow::anyhow!("driver-backed subagent returned without a durable host outcome")))