Allow configuring model for built-in agents without replacing entire agent definition

Resolved 💬 3 comments Opened Feb 13, 2026 by testaccedu Closed Feb 17, 2026

Problem

Built-in agents like Explore have a hardcoded model (e.g., haiku). If a user doesn't have access to that specific model, the agent fails with:

There's an issue with the selected model (claude-haiku-4-5). It may not exist or you may not have access to it.

The environment variable CLAUDE_CODE_SUBAGENT_MODEL only affects agents without an explicit model defined - it doesn't override the built-in agents' model settings.

Current Workaround

Users must create their own agent file (e.g., ~/.claude/agents/Explore.md) that completely replaces the built-in agent. This means:

  • Losing the carefully crafted prompts from Anthropic
  • Having to guess at the original agent's behavior
  • Missing out on future improvements to the built-in agents

Proposed Solution

Add a way to override only the model for built-in agents while keeping their original prompts and configuration. Options:

  1. Model-specific env vars: CLAUDE_CODE_EXPLORE_MODEL=sonnet
  2. Override priority: Make CLAUDE_CODE_SUBAGENT_MODEL override even explicit model settings
  3. Config file option: Allow settings.json to specify model overrides per agent name

Use Case

  • Users on API plans without access to certain models (e.g., no Haiku access)
  • Teams wanting to use higher-quality models for exploration tasks
  • Cost optimization by using cheaper models for simple agents

Environment

  • Claude Code version: 2.1.41
  • OS: Windows 11

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗