{"record":{"id":"c9539f989869a7e7","repo":"tinyhumansai/openhuman","slug":"agent-id-not-found","errorCode":null,"errorMessage":"agent_id '{}' not found","messagePattern":"agent_id '(.+?)' not found","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/orchestration/tools/spawn_worker_thread.rs","lineNumber":194,"sourceCode":"            if is_delegated_label || current_thread.parent_thread_id.is_some() {\n                tracing::warn!(\n                    agent_id = %agent_id,\n                    current_thread_id = %current_thread_id,\n                    is_delegated_label,\n                    has_parent_thread_id = current_thread.parent_thread_id.is_some(),\n                    elapsed_ms = started.elapsed().as_millis() as u64,\n                    \"[spawn_worker_thread] depth guard blocked spawn from worker thread\"\n                );\n                return Ok(ToolResult::error(\"Worker threads cannot spawn other worker threads. Depth is capped at 1. Use spawn_subagent for inline delegation instead.\"));\n            }\n        }\n\n        let registry = AgentDefinitionRegistry::global()\n            .ok_or_else(|| anyhow::anyhow!(\"AgentDefinitionRegistry not initialised\"))?;\n\n        let definition = registry\n            .get(&agent_id)\n            .ok_or_else(|| anyhow::anyhow!(\"agent_id '{}' not found\", agent_id))?;\n\n        if !parent.allowed_subagent_ids.contains(&definition.id) {\n            tracing::warn!(\n                parent_agent = %parent.agent_definition_id,\n                requested_agent = %definition.id,\n                allowed = ?parent.allowed_subagent_ids,\n                \"[spawn_worker_thread] blocked subagent outside parent allowlist\"\n            );\n            return Ok(ToolResult::error(format!(\n                \"spawn_worker_thread: agent '{}' is not in parent agent '{}' subagents.allowlist\",\n                definition.id, parent.agent_definition_id\n            )));\n        }\n\n        tracing::debug!(\n            parent_agent = %parent.agent_definition_id,\n            requested_agent = %definition.id,\n            \"[spawn_worker_thread] subagent allowlist check passed\"","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/agent/orchestration/tools/spawn_worker_thread.rs#L176-L212","documentation":"The agent_id supplied to spawn_worker_thread resolves to no entry in the AgentDefinitionRegistry — the requested worker agent does not exist in this build/config. The registry holds builtin and configured agents; the faulting input is the agent_id string (typo, removed agent, or an agent compiled out by a feature gate — e.g. a gated builtin agent referenced by an ungated orchestrator TOML).","triggerScenarios":"Thrown at src/openhuman/agent/orchestration/tools/spawn_worker_thread.rs:194 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["List available agent definitions and correct the agent_id","If a builtin agent is expected, verify its feature gate is enabled in this build","Update the referencing config/TOML if the agent was renamed or removed"],"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"}