Skip to content

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

refactor(subagent_host): simplify shared subagent flight lookup

Steven Enamakelab1030ab6e92
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
index 56e186b701..afe165b068 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
@@ -583,12 +583,8 @@ pub(super) fn shared_subagent_flight(
.unwrap_or_else(|poisoned| poisoned.into_inner());
// Key by the normalized root so every caller of one task, whether or not the
// directory exists yet, reaches the same reservation.
- flights
- .entry(checkpoint::absolute_checkpoint_dir(
- checkpoint_dir.to_path_buf(),
- ))
- .or_default()
- .clone()
+ let root = checkpoint::absolute_checkpoint_dir(checkpoint_dir.to_path_buf());
+ flights.entry(root).or_default().clone()
}
impl OpenHumanSubagentHost {