Skip to content

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

fix(agent): handle missing runtime in team orchestration

Steven Enamakel35760e829e48
diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
index 9042cb12c4..349c921021 100644
--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
@@ -49,8 +49,11 @@ use tinyagents_orchestration::teams::{
use crate::agent::tinyagents::observability::GraphTracingSink;
const LOG_TARGET: &str = "agent_team_runtime";
-/// Fallback worker archetype when a member carries no explicit `agent_id`.
-const DEFAULT_TEAMMATE_AGENT_ID: &str = "tools_agent";
+/// Fallback archetype when a member carries no explicit `agent_id`: the
+/// orchestrator, the one general-purpose agent with the full direct belt plus
+/// `tool_search` and skills. Same fallback a cron job with an unknown agent
+/// uses (`cron/scheduler/agent_run.rs`).
+const DEFAULT_TEAMMATE_AGENT_ID: &str = "orchestrator";
/// Event recorded when a worker run ends without completing its task.
const MEMBER_FAILED_EVENT: &str = "team_member_failed";
/// Cap on how much worker output is captured as evidence (UTF-8 safe).
diff --git a/crates/openhuman-core/src/agent/registry/ops.rs b/crates/openhuman-core/src/agent/registry/ops.rs
index 86d9086f1e..70fcff7912 100644
--- a/crates/openhuman-core/src/agent/registry/ops.rs
+++ b/crates/openhuman-core/src/agent/registry/ops.rs
@@ -12,11 +12,6 @@ use super::types::{AgentRegistryEntry, AgentRegistryPatch, AgentRegistrySource,
const ORCHESTRATOR_AGENT_ID: &str = "orchestrator";
-/// Wildcard agent whose tool surface is the complete built-in tool catalog.
-/// Used as the source for [`available_tools`] — the orchestrator's curated
-/// `named` list is only a subset, so it can't back a general tool picker.
-const TOOLS_CATALOG_AGENT_ID: &str = "tools_agent";
-
pub async fn list_agents(include_disabled: bool) -> Result<Vec<AgentRegistryEntry>, String> {
let config = config_rpc::load_config_with_timeout().await?;
Ok(merge_entries(
@@ -140,23 +135,24 @@ pub async fn remove_agent(id: &str) -> Result<bool, String> {
/// List every assignable agent tool, with descriptions, for the editor's
/// tool picker.
///
-/// Built from the wildcard [`TOOLS_CATALOG_AGENT_ID`] agent's `tool_specs()`:
-/// its `ToolScope::Wildcard` definition resolves to the full built-in tool
-/// catalog, so the names returned here are exactly the identifiers a
-/// `tool_allowlist` is matched against. (The orchestrator uses a curated
-/// `named` subset, so it would yield an incomplete catalog.) Connected-
-/// integration / delegation tools are intentionally not fetched — the picker
+/// Built from the orchestrator session's *durable* registry
+/// (`durable_tool_specs_arc`), not its advertised belt: every session is built
+/// over the complete built-in tool catalog and narrows only what it
+/// advertises, so the durable specs are exactly the identifiers a
+/// `tool_allowlist` is matched against, including `Deferred` tools the
+/// orchestrator reaches through `tool_search`. Synthesised delegation tools
+/// live in a separate set and are intentionally not included — the picker
/// surfaces the stable built-in surface only. Sorted + deduped by name for a
/// stable picker UI.
pub async fn available_tools() -> Result<Vec<AgentToolInfo>, String> {
let config = config_rpc::load_config_with_timeout().await?;
AgentDefinitionRegistry::init_global(&config.workspace_dir)
.map_err(|e| format!("failed to initialise AgentDefinitionRegistry: {e}"))?;
- let agent = OpenHumanSessionHost::from_config_for_agent(&config, TOOLS_CATALOG_AGENT_ID)
+ let agent = OpenHumanSessionHost::from_config_for_agent(&config, ORCHESTRATOR_AGENT_ID)
.map_err(|e| format!("failed to build tools-catalog agent: {e}"))?;
let mut tools: Vec<AgentToolInfo> = agent
- .tool_specs()
+ .durable_tool_specs_arc()
.iter()
.map(|spec| AgentToolInfo {
name: spec.name.clone(),