tinyhumansai/openhuman · error · anyhow::Error

integrations_agent definition not in registry

Error message

integrations_agent definition not in registry

What it means

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.

Source

Thrown at src/openhuman/agent/debug/mod.rs:401

        .iter()
        .map(|t| PromptTool {
            name: t.name(),
            description: t.description(),
            parameters_schema: Some(t.parameters_schema().to_string()),
        })
        .collect();

    // Narrow the connected_integrations slice to just the bound
    // toolkit so the prompt's Connected Integrations / tool catalogue
    // doesn't leak peer toolkits into this sub-agent's context.
    let narrow_integrations = vec![integration.clone()];

    let registry = AgentDefinitionRegistry::global()
        .ok_or_else(|| anyhow!("AgentDefinitionRegistry missing after init"))?;
    let definition: AgentDefinition = registry
        .get(INTEGRATIONS_AGENT_ID)
        .cloned()
        .ok_or_else(|| anyhow!("integrations_agent definition not in registry"))?;
    let build = match &definition.system_prompt {
        PromptSource::Dynamic(f) => *f,
        _ => {
            return Err(anyhow!(
                "integrations_agent must use PromptSource::Dynamic; got {:?}",
                match &definition.system_prompt {
                    PromptSource::Inline(_) => "Inline",
                    PromptSource::File { .. } => "File",
                    PromptSource::Dynamic(_) => "Dynamic",
                }
            ));
        }
    };

    let empty_visible: HashSet<String> = HashSet::new();
    let model_name = definition.model.resolve(agent.model_name()).to_string();
    let ctx = PromptContext {
        workspace_dir: agent.workspace_dir(),

View on GitHub (pinned to a221052e0d)

Solutions

  1. Check the workspace agents override files for a removal/rename of integrations_agent and restore the id.
  2. Retry after removing the override directory to confirm builtins load.
  3. Confirm the binary actually embeds the integrations_agent builtin (full/product feature set).
  4. Use dump-all to enumerate live ids and spot the rename.
Defensive patterns

Strategy: validation

Validate before calling

let present: HashSet<String> = AgentDefinitionRegistry::global()
    .map(|reg| reg.list().into_iter().map(|d| d.id.clone()).collect())
    .unwrap_or_default();
if !present.contains("integrations_agent") {
    anyhow::bail!("integrations_agent missing; loaded ids: {present:?}");
}

Type guard

fn integrations_agent_registered() -> bool {
    AgentDefinitionRegistry::global()
        .map(|reg| reg.get("integrations_agent").is_some())
        .unwrap_or(false)
}

Try / catch

match registry.get(INTEGRATIONS_AGENT_ID).cloned() {
    Some(def) => def,
    None => {
        // Distinguish from the registry-missing case: here builtins were not
        // loaded or an override removed the id. Check overrides + build features.
    }
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Related errors


AI-assisted analysis of tinyhumansai/openhuman@a221052e0d (2026-08-16). Data as JSON: /api/errors/98cd860047c03a85. Report an issue: GitHub.