{"record":{"id":"5f2bab7061436b5f","repo":"tinyhumansai/openhuman","slug":"integrations-agent-definition-missing-from-registr","errorCode":null,"errorMessage":"integrations_agent definition missing from registry","messagePattern":"integrations_agent definition missing from registry","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/agent/debug/mod.rs","lineNumber":341,"sourceCode":"            }\n        }\n        ComposioClientKind::Direct(_) => {\n            log::info!(\n                \"[agent::debug][composio-direct] direct mode active — skipping backend list_tools refresh for `{}`; using cached catalogue ({} actions)\",\n                integration.toolkit,\n                integration.tools.len()\n            );\n        }\n    }\n\n    // Build the tool list that subagent_runner would produce for a\n    // real spawn. Tool visibility honours the TOML scope on the\n    // `integrations_agent` definition — `named = [...]` narrows, and\n    // `wildcard = {}` means \"every parent tool\". The dynamic\n    // ComposioActionTools for the bound toolkit are added after.\n    let definition_snapshot = AgentDefinitionRegistry::global()\n        .and_then(|reg| reg.get(INTEGRATIONS_AGENT_ID).cloned())\n        .ok_or_else(|| anyhow!(\"integrations_agent definition missing from registry\"))?;\n    let base_tools: Vec<Box<dyn Tool>> = match &definition_snapshot.tools {\n        crate::openhuman::agent::harness::definition::ToolScope::Named(names) => {\n            let allow: HashSet<&str> = names.iter().map(|s| s.as_str()).collect();\n            agent\n                .tools()\n                .iter()\n                .filter(|t| allow.contains(t.name()))\n                .map(|t| clone_tool_as_prompt_proxy(t.as_ref()))\n                .collect()\n        }\n        crate::openhuman::agent::harness::definition::ToolScope::Wildcard => agent\n            .tools()\n            .iter()\n            .map(|t| clone_tool_as_prompt_proxy(t.as_ref()))\n            .collect(),\n    };\n    // `ComposioActionTool` takes `Arc<Config>` rather than a pre-baked\n    // `ComposioClient` so the live `composio.mode` toggle is honoured","sourceCodeStart":323,"sourceCodeEnd":359,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/a221052e0df5b1f7598fceba7329fd1af95d6699/src/openhuman/agent/debug/mod.rs#L323-L359","documentation":"In render_integrations_agent (src/openhuman/agent/debug/mod.rs:341), after building the tool list, the code re-fetches the registry and `reg.get(INTEGRATIONS_AGENT_ID)` returns None. The registry existed moments earlier (tool scope was resolved from a definition_snapshot at 341's caller path), so the built-in integrations_agent has been removed/replaced by workspace overrides, or the global was swapped between reads.","triggerScenarios":"A workspace agents TOML override that replaces built-ins removed the integrations_agent id (renamed it); registry reloaded between the snapshot read and this lookup; a custom DefinitionSource::Workspace set that shadows then drops the id.","commonSituations":"Users editing `<workspace>` agent override TOMLs and deleting/renaming the integrations_agent entry; two processes sharing a workspace while one rewrites overrides; stale override files from an older layout.","solutions":["Inspect the workspace agents override directory for an entry that removed/renamed integrations_agent and restore it.","Retry once to rule out a concurrent registry reload window.","List current ids (registry.list() via the debug dump-all path) to confirm whether integrations_agent is present.","Remove the offending override file entirely to fall back to the bundled builtin set."],"exampleFix":"# before: workspace override file deletes/replaces the builtin\n# <workspace>/agents/overrides.toml renames integrations_agent -> integrations_helper\n# after: restore the id or delete the override\nrm <workspace>/agents/overrides.toml   # builtins (incl. integrations_agent) return","handlingStrategy":"validation","validationCode":"let snapshot = AgentDefinitionRegistry::global()\n    .and_then(|reg| reg.get(\"integrations_agent\").cloned())\n    .ok_or_else(|| {\n        anyhow!(\"integrations_agent absent — check workspace agent overrides for a removal/rename\")\n    })?;","typeGuard":"fn registry_has_integrations_agent() -> bool {\n    AgentDefinitionRegistry::global()\n        .map(|reg| reg.get(\"integrations_agent\").is_some())\n        .unwrap_or(false)\n}","tryCatchPattern":"match AgentDefinitionRegistry::global().and_then(|r| r.get(id).cloned()) {\n    Some(def) => def,\n    None => {\n        // Registry present but id gone: surface which overrides are loaded\n        // (workspace agents dir) and suggest removing them; retry once to\n        // rule out a concurrent reload window.\n    }\n}","preventionTips":["Never delete or rename built-in agent ids in workspace overrides — extend them instead.","After editing override TOMLs, verify with a dump-all that builtins still resolve.","Keep the override directory out of concurrent multi-process writes."],"tags":["rust","registry","agent-definitions","workspace-overrides","not-found","debug"],"backgroundTag":null,"analyzedSha":"a221052e0df5b1f7598fceba7329fd1af95d6699","analyzedAt":"2026-08-16T12:47:06.542Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}