Skip to content

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

refactor(agent): centralize subagent event publishing and clean up tests

Steven Enamakel5ed7e36eee1c
diff --git a/crates/openhuman-core/src/agent/orchestration/subagent_events.rs b/crates/openhuman-core/src/agent/orchestration/subagent_events.rs
index 4f4a95595f..e0fb315cda 100644
--- a/crates/openhuman-core/src/agent/orchestration/subagent_events.rs
+++ b/crates/openhuman-core/src/agent/orchestration/subagent_events.rs
@@ -4,8 +4,7 @@
//! `SubagentFailed` / `SubagentAwaitingUser`) used to be hand-constructed and
//! `publish_global`-ed inline across every turn/orchestration path
//! (`tools/dispatch.rs`, `tools/spawn_subagent.rs`,
-//! `tools/spawn_async_subagent.rs`, `tools/continue_subagent.rs`,
-//! `spawn_parallel.rs`). That scattered
+//! `tools/spawn_async_subagent.rs`, and `tools/continue_subagent.rs`). That scattered
//! the ordering/rate-limiting decision across many call sites.
//!
//! This module centralizes construction + publish so there is exactly one place
diff --git a/crates/openhuman-core/src/agent/prompts/types.rs b/crates/openhuman-core/src/agent/prompts/types.rs
index 039de71de2..c6a0b2762e 100644
--- a/crates/openhuman-core/src/agent/prompts/types.rs
+++ b/crates/openhuman-core/src/agent/prompts/types.rs
@@ -316,8 +316,8 @@ pub struct PromptContext<'a> {
/// turn) so the frozen system-prompt prefix / KV-cache contract holds.
pub agents_md_global: Option<String>,
/// Pre-loaded project-layer `AGENTS.md` content — `<action_dir>/AGENTS.md`,
- /// or a sub-agent's `worktree_action_dir` override. `None` when the file is
- /// absent/empty, deduplicated against the global layer (same dir), or the
+ /// `None` when the file is absent/empty, deduplicated against the global
+ /// layer (same dir), or the
/// gate is off. Rendered after the global layer.
pub agents_md_local: Option<String>,
}
diff --git a/crates/openhuman-core/src/agent/tinyagents/topology_collision_tests.rs b/crates/openhuman-core/src/agent/tinyagents/topology_collision_tests.rs
index 83edd0b239..d0f4b0aa5e 100644
--- a/crates/openhuman-core/src/agent/tinyagents/topology_collision_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/topology_collision_tests.rs
@@ -30,12 +30,6 @@ fn all_topologies_names_do_not_collide_with_production_tools() {
);
let tool_names: std::collections::HashSet<_> = tools.iter().map(|t| t.name()).collect();
- // Verify runtime tool `spawn_parallel_agents` is present in the checked tool set
- assert!(
- tool_names.contains("spawn_parallel_agents"),
- "expected spawn_parallel_agents in production all_tools registration"
- );
-
let reports = crate::agent::tinyagents::tool_registration::host_graph_topologies();
for report in &reports {
assert!(