{"record":{"id":"98cd860047c03a85","repo":"tinyhumansai/openhuman","slug":"integrations-agent-definition-not-in-registry","errorCode":null,"errorMessage":"integrations_agent definition not in registry","messagePattern":"integrations_agent definition not in registry","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/debug/mod.rs","lineNumber":401,"sourceCode":"        .iter()\n        .map(|t| PromptTool {\n            name: t.name(),\n            description: t.description(),\n            parameters_schema: Some(t.parameters_schema().to_string()),\n        })\n        .collect();\n\n    // Narrow the connected_integrations slice to just the bound\n    // toolkit so the prompt's Connected Integrations / tool catalogue\n    // doesn't leak peer toolkits into this sub-agent's context.\n    let narrow_integrations = vec![integration.clone()];\n\n    let registry = AgentDefinitionRegistry::global()\n        .ok_or_else(|| anyhow!(\"AgentDefinitionRegistry missing after init\"))?;\n    let definition: AgentDefinition = registry\n        .get(INTEGRATIONS_AGENT_ID)\n        .cloned()\n        .ok_or_else(|| anyhow!(\"integrations_agent definition not in registry\"))?;\n    let build = match &definition.system_prompt {\n        PromptSource::Dynamic(f) => *f,\n        _ => {\n            return Err(anyhow!(\n                \"integrations_agent must use PromptSource::Dynamic; got {:?}\",\n                match &definition.system_prompt {\n                    PromptSource::Inline(_) => \"Inline\",\n                    PromptSource::File { .. } => \"File\",\n                    PromptSource::Dynamic(_) => \"Dynamic\",\n                }\n            ));\n        }\n    };\n\n    let empty_visible: HashSet<String> = HashSet::new();\n    let model_name = definition.model.resolve(agent.model_name()).to_string();\n    let ctx = PromptContext {\n        workspace_dir: agent.workspace_dir(),","sourceCodeStart":383,"sourceCodeEnd":419,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/openhuman/agent/debug/mod.rs#L383-L419","documentation":"Prompt-builder path at src/openhuman/agent/debug/mod.rs:401: the registry global is present, but `registry.get(INTEGRATIONS_AGENT_ID)` is None — the integrations_agent definition itself is absent from the loaded set. Distinct from 395 (no registry at all): here the registry exists but lacks the id, meaning built-ins were not loaded or an override removed the entry.","triggerScenarios":"Workspace override replaced/removed the integrations_agent entry; registry was initialized from a workspace whose builtin load path was skipped; feature-gated compile removed the agent from the bundled set (e.g. a slim build without integrations surface).","commonSituations":"Editing workspace agent TOMLs; running a debug dump against a stripped-down build; pointing --workspace at a directory whose overrides shadow the built-in set.","solutions":["Check the workspace agents override files for a removal/rename of integrations_agent and restore the id.","Retry after removing the override directory to confirm builtins load.","Confirm the binary actually embeds the integrations_agent builtin (full/product feature set).","Use dump-all to enumerate live ids and spot the rename."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let present: HashSet<String> = AgentDefinitionRegistry::global()\n    .map(|reg| reg.list().into_iter().map(|d| d.id.clone()).collect())\n    .unwrap_or_default();\nif !present.contains(\"integrations_agent\") {\n    anyhow::bail!(\"integrations_agent missing; loaded ids: {present:?}\");\n}","typeGuard":"fn integrations_agent_registered() -> bool {\n    AgentDefinitionRegistry::global()\n        .map(|reg| reg.get(\"integrations_agent\").is_some())\n        .unwrap_or(false)\n}","tryCatchPattern":"match registry.get(INTEGRATIONS_AGENT_ID).cloned() {\n    Some(def) => def,\n    None => {\n        // Distinguish from the registry-missing case: here builtins were not\n        // loaded or an override removed the id. Check overrides + build features.\n    }\n}","preventionTips":["Guard code that depends on a specific agent id with a registry.contains check at startup.","Verify slim/feature-gated builds still embed the agents your code references.","Ensure init_global ran against the same workspace whose overrides you edit."],"tags":["rust","registry","agent-definitions","not-found","integrations","debug"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}