{"record":{"id":"f84f1b7c03fe8cc1","repo":"tinyhumansai/openhuman","slug":"agent-definition-not-found-in-registry","errorCode":null,"errorMessage":"agent definition '{}' not found in registry","messagePattern":"agent definition '(.+?)' not found in registry","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/harness/session/builder/factory.rs","lineNumber":1414,"sourceCode":"    if agent_id == \"orchestrator\" {\n        // Orchestrator is allowed to be missing from every source (legacy\n        // path, tests, pre-startup) — fall back to default behaviour.\n        log::debug!(\n            \"[agent::builder] orchestrator definition not in any registry — using legacy \\\n             default prompt + filter\"\n        );\n        return Ok(None);\n    }\n\n    if registry.is_none() {\n        return Err(anyhow::anyhow!(\n            \"AgentDefinitionRegistry is not initialised — cannot resolve agent '{}'. Call \\\n             AgentDefinitionRegistry::init_global at startup.\",\n            agent_id\n        ));\n    }\n\n    Err(anyhow::anyhow!(\n        \"agent definition '{}' not found in registry\",\n        agent_id\n    ))\n}\n\nfn definition_disallows_tool(disallowed: &[String], name: &str) -> bool {\n    disallowed.iter().any(|entry| {\n        if let Some(prefix) = entry.strip_suffix('*') {\n            name.starts_with(prefix)\n        } else {\n            entry == name\n        }\n    })\n}\n\n/// Which tool-call dialect a session speaks to its provider.\n#[derive(Debug, Clone, Copy, PartialEq, Eq)]\nenum DispatcherKind {","sourceCodeStart":1396,"sourceCodeEnd":1432,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/harness/session/builder/factory.rs#L1396-L1432","documentation":"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.","triggerScenarios":"Thrown at src/openhuman/agent/harness/session/builder/factory.rs:1414 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Ensure AgentDefinitionRegistry::init_global is called during core startup before any turn runs","Check the agent id spelling against registered builtin agents and workspace agent TOML files","Add a workspace agent definition for the requested id if it is meant to exist"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}