tinyhumansai/openhuman · error · anyhow::Error
agent definition `{agent_id}` not found in registry
Error message
agent definition `{agent_id}` not found in registry What it means
Sub-agent dispatch cannot resolve the requested agent_id to a definition in the global AgentDefinitionRegistry. One site is a deliberate sentinel: ids starting with `missing-agent-` always error here (test/probe path); the other is a real registry miss after the registry was guaranteed initialised — the id names no loaded builtin or TOML-defined agent.
Source
Thrown at src/openhuman/agent/triage/escalation.rs:286
if agent_id.starts_with("missing-agent-") {
return Err(anyhow!(
"agent definition `{agent_id}` not found in registry"
));
}
let config = Config::load_or_init()
.await
.context("loading config for sub-agent dispatch")?;
let parent_ctx = build_triage_parent(&config, agent_id).await?;
// `build_root_parent` (inside `build_triage_parent`) guarantees the registry
// is initialised, so this lookup for the target definition is safe here.
let registry = AgentDefinitionRegistry::global()
.ok_or_else(|| anyhow!("AgentDefinitionRegistry not initialised"))?;
let definition = registry
.get(agent_id)
.ok_or_else(|| anyhow!("agent definition `{agent_id}` not found in registry"))?;
tracing::debug!(
agent_id = %agent_id,
model = %parent_ctx.model_name,
tool_count = parent_ctx.all_tools.len(),
"[triage::escalation] dispatching run_subagent with parent context"
);
let outcome = with_parent_context(parent_ctx, async {
subagent_runner::run_subagent(definition, prompt, SubagentRunOptions::default()).await
})
.await
.map_err(|e| anyhow!("run_subagent(`{agent_id}`) failed: {e}"))?;
tracing::debug!(
agent_id = %agent_id,
elapsed_ms = outcome.elapsed.as_millis() as u64,
iterations = outcome.iterations,View on GitHub (pinned to 7491200858)
Solutions
- Verify the agent id is spelled exactly as registered (builtin ids or agent.toml names)
- Ensure the agent's definition file is loaded at startup (registry initialisation)
- Do not dispatch to removed agents such as the deleted account_admin_agent
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/agent/triage/escalation.rs:286 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/0dbe43ca77dd102f.
Report an issue: GitHub.