coleam00/Archon · warning

mcp_haiku_tool_search

mcp_haiku_tool_search

Error message

Using Haiku model with MCP servers — tool search (lazy loading for many tools) is not supported on Haiku. Consider using Sonnet or Opus.

What it means

Tool search (lazy loading of large tool sets) is not supported on Haiku models. When MCP servers are configured and the selected model name contains 'haiku', the provider warns (code mcp_haiku_tool_search) that lazy loading won't work and suggests a larger model.

Source

Thrown at packages/providers/src/claude/provider.ts:631

    const mcpPath = nodeConfig.mcp;
    const { servers, serverNames, missingVars } = await loadMcpConfig(mcpPath, cwd);
    options.mcpServers = servers as Options['mcpServers'];
    const mcpWildcards = serverNames.map(name => `mcp__${name}__*`);
    options.allowedTools = [...(options.allowedTools ?? []), ...mcpWildcards];
    getLog().info({ serverNames, mcpPath }, 'claude.mcp_config_loaded');
    if (missingVars.length > 0) {
      const uniqueVars = [...new Set(missingVars)];
      getLog().warn({ missingVars: uniqueVars }, 'claude.mcp_env_vars_missing');
      warnings.push({
        code: 'mcp_env_vars_missing',
        message: `MCP config references undefined env vars: ${uniqueVars.join(', ')}. These will be empty strings — MCP servers may fail to authenticate.`,
      });
    }
    // Haiku models don't support tool search (lazy loading for many tools)
    if (options.model?.toLowerCase().includes('haiku')) {
      getLog().warn({ model: options.model }, 'claude.mcp_haiku_tool_search_unsupported');
      warnings.push({
        code: 'mcp_haiku_tool_search',
        message:
          'Using Haiku model with MCP servers — tool search (lazy loading for many tools) is not supported on Haiku. Consider using Sonnet or Opus.',
      });
    }
  }

  // Native skill selection. The SDK requires Skill to remain allowed when an
  // explicit tool list is present; without a list, its normal tool set applies.
  if (selectsSkills) {
    if (!options.allowedTools?.includes('Skill')) {
      options.allowedTools = [...(options.allowedTools ?? []), 'Skill'];
    }
    getLog().info({ skills: nodeConfig.skills }, 'claude.skills_selected');
  }

  // agents → inline AgentDefinition pass-through.
  // Inline agents remain sub-agents invokable through the Agent tool; native
  // skill selection does not replace the query's primary agent.

View on GitHub (pinned to 0773b97458)

Solutions

  1. Switch the node's model to Sonnet or Opus.
  2. Keep Haiku but reduce/remove MCP servers, or inline only the needed tools.
  3. Accept the limitation: tools will not be lazily loaded and may exceed context or fail.

Example fix

// before (workflow YAML)
model: claude-haiku-4-5
mcp: github-mcp
// warning: tool search unsupported on Haiku
// after
model: claude-sonnet-4-5
mcp: github-mcp
Defensive patterns

Strategy: validation

Validate before calling

if (/haiku/i.test(node.model ?? '') && (node.mcpServers?.length ?? 0) > 0) {
  console.warn('Haiku + MCP: tool search unsupported; use Sonnet/Opus or drop MCP servers');
}

Prevention

When it happens

Trigger: Configuring a node with model like 'claude-haiku-...' together with one or more MCP servers in the node's MCP config.

Common situations: Choosing Haiku to cut costs while keeping a wide MCP tool surface; a workflow default model of Haiku combined with MCP-heavy nodes.

Related errors


AI-assisted analysis of coleam00/Archon@0773b97458 (2026-09-01). Data as JSON: /api/errors/f7950bc7a608684e. Report an issue: GitHub.