tinyhumansai/openhuman · error · anyhow::Error

agent definition ' ' not found in registry

Error message

agent definition '{}' not found in registry

What it means

Agent resolution looked up an agent id in the AgentDefinitionRegistry and found no built-in or workspace definition for it. Only the 'orchestrator' id is allowed to be missing (legacy fallback); for every other id this means the registry was never initialised at startup or the id is unknown/misspelled/not installed as a workspace override.

Solutions

  1. Ensure AgentDefinitionRegistry::init_global is called during core startup before any turn runs
  2. Check the agent id spelling against registered builtin agents and workspace agent TOML files
  3. Add a workspace agent definition for the requested id if it is meant to exist
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at src/openhuman/agent/harness/session/builder/factory.rs:1414 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/f84f1b7c03fe8cc1. Report an issue: GitHub.

Appendix: source

Thrown at src/openhuman/agent/harness/session/builder/factory.rs:1414

    if agent_id == "orchestrator" {
        // Orchestrator is allowed to be missing from every source (legacy
        // path, tests, pre-startup) — fall back to default behaviour.
        log::debug!(
            "[agent::builder] orchestrator definition not in any registry — using legacy \
             default prompt + filter"
        );
        return Ok(None);
    }

    if registry.is_none() {
        return Err(anyhow::anyhow!(
            "AgentDefinitionRegistry is not initialised — cannot resolve agent '{}'. Call \
             AgentDefinitionRegistry::init_global at startup.",
            agent_id
        ));
    }

    Err(anyhow::anyhow!(
        "agent definition '{}' not found in registry",
        agent_id
    ))
}

fn definition_disallows_tool(disallowed: &[String], name: &str) -> bool {
    disallowed.iter().any(|entry| {
        if let Some(prefix) = entry.strip_suffix('*') {
            name.starts_with(prefix)
        } else {
            entry == name
        }
    })
}

/// Which tool-call dialect a session speaks to its provider.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
enum DispatcherKind {

View on GitHub (pinned to 7491200858)