Add defaultAgentModel setting to user/project config
Feature Request
Problem
Claude Code's built-in core agents (general-purpose, Explore, Plan) have their model hardcoded in the compiled binary. Users who want all subagents to run on a specific model (e.g., opus) have no way to configure this for the core agents.
Currently, plugin-based agents (code-reviewer, code-explorer, code-architect, etc.) can be manually edited in ~/.claude/plugins/cache/, and custom agents in ~/.claude/agents/ support a model: frontmatter field. But:
- Core agents (general-purpose, Explore, Plan) are baked into the binary with no override mechanism
- Plugin agent edits get wiped on plugin updates
- There's no unified setting to control the default model for all spawned agents
Proposed Solution
Add a defaultAgentModel (or similar) setting to the user settings (~/.claude/settings.json) and/or project settings (.claude/settings.json) that acts as a default model for all agent spawns unless explicitly overridden:
{
"defaultAgentModel": "opus"
}
Resolution order:
- Explicit
modelparameter in the Agent tool call (highest priority) - Agent definition frontmatter
model:field defaultAgentModelfrom project settingsdefaultAgentModelfrom user settings- Built-in default (current behavior)
Why This Matters
- Users on Max plans or with sufficient API quota want to leverage opus across all agents for maximum quality
- Currently requires editing cached plugin files (fragile, lost on updates) and has no solution at all for core agents
- A single config setting would give users full control without needing to hack binaries or plugin caches
Environment
- Claude Code v2.1.74
- macOS (arm64)
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗