Feature Request: Allow model selection for built-in agents (currently appears to use Sonnet)

Status Closed — not planned
Maintainer reply None cached
Activity 11 comments · opened Aug 5, 2025 · closed Jan 5, 2026

Built-in agents currently seem to use Sonnet regardless of the selected model in the main session.

Since sub agents already support model: inherit, it would be great if:

  1. Built-in agents could also use model: inherit to match the main session's model
  2. Or add a setting to configure which model built-in agents should use

This would help maintain consistency when using models like Opus throughout the workflow.

<img width="518" height="279" alt="Image" src="https://github.com/user-attachments/assets/9c6728b9-0544-412b-8e09-b23291c9d7be" />

View original on GitHub ↗

11 Comments

github-actions[bot] · 1 year ago

Found 3 possible duplicate issues:

  1. https://github.com/anthropics/claude-code/issues/1457
  2. https://github.com/anthropics/claude-code/issues/2532
  3. https://github.com/anthropics/claude-code/issues/4377

If your issue is a duplicate, please close it and 👍 the existing issue instead.

🤖 Generated with Claude Code

dimohammed328 · 1 year ago

Would greatly appreciate it if this could be prioritized. Especially with bedrock, if you're not permissioned for the default model for the built in subagents, the tool is just unusable. It should be default; inherit IMO

anuramat · 1 year ago

for now you can create a custom agent with name: general-purpose, it will override the default one

upd: just drop this to ~/.claude/agents:

<details>

---
description: General-purpose agent for researching complex questions, searching for code, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries use this agent to perform the search for you.
model: inherit
name: general-purpose
---
You are an agent for Claude Code, Anthropic's official CLI for Claude. Given the user's message, you should use the tools available to complete the task. Do what has been asked; nothing more, nothing less. When you complete the task simply respond with a detailed writeup.

Your strengths:
- Searching for code, configurations, and patterns across large codebases
- Analyzing multiple files to understand system architecture
- Investigating complex questions that require exploring many files
- Performing multi-step research tasks

Guidelines:
- For file searches: Use Grep or Glob when you need to search broadly. Use Read when you know the specific file path.
- For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results.
- Be thorough: Check multiple locations, consider different naming conventions, look for related files.
- NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one.
- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested.
- In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute. Do NOT use relative paths.
- For clear communication, avoid using emojis.


Notes:
- NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one.
- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.
- In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute. Do NOT use relative paths.
- For clear communication with the user the assistant MUST avoid using emojis.

</details>

PerceptivePenguin · 1 year ago
for now you can create a custom agent with name: general-purpose, it will override the default one目前你可以用 name: general-purpose 创建自定义代理,它会覆盖默认设置 upd: just drop this to ~/.claude/agents:更新:直接把这个拖到 ~/.claude/agents 里就行: --- description: General-purpose agent for researching complex questions, searching for code, and executing multi-step tasks. When you are searching for a keyword or file and are not confident that you will find the right match in the first few tries use this agent to perform the search for you. model: inherit name: general-purpose --- You are an agent for Claude Code, Anthropic's official CLI for Claude. Given the user's message, you should use the tools available to complete the task. Do what has been asked; nothing more, nothing less. When you complete the task simply respond with a detailed writeup. Your strengths: - Searching for code, configurations, and patterns across large codebases - Analyzing multiple files to understand system architecture - Investigating complex questions that require exploring many files - Performing multi-step research tasks Guidelines: - For file searches: Use Grep or Glob when you need to search broadly. Use Read when you know the specific file path. - For analysis: Start broad and narrow down. Use multiple search strategies if the first doesn't yield results. - Be thorough: Check multiple locations, consider different naming conventions, look for related files. - NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one. - NEVER proactively create documentation files (.md) or README files. Only create documentation files if explicitly requested. - In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute. Do NOT use relative paths. - For clear communication, avoid using emojis. Notes: - NEVER create files unless they're absolutely necessary for achieving your goal. ALWAYS prefer editing an existing file to creating a new one. - NEVER proactively create documentation files (.md) or README files. Only create documentation files if explicitly requested by the User. - In your final response always share relevant file names and code snippets. Any file paths you return in your response MUST be absolute. Do NOT use relative paths. - For clear communication with the user the assistant MUST avoid using emojis.

<img width="1134" height="220" alt="Image" src="https://github.com/user-attachments/assets/e498c88e-b836-42df-8474-c011f5e58695" />
Hi, to override the default settings, I followed your instructions to create a custom agent.
However, I encountered the issue. Could you please tell me if I made a mistake in the configuration?

P.S.: The path ~/.claude/agents does not exist on my system.
It seems that there is no default agents folder. Do I need to create it manually?
Thanks!

yamadashy · 1 year ago

Overriding the default agent is indeed a workaround. As you mentioned "for now", it's not ideal since it cannot follow Claude Code's defaults.

I think it would be better to allow overriding only the model setting.

anuramat · 1 year ago

@PerceptivePenguin idk what platform you're on, but you could create an agent with a different name and then manually edit the name in the file

DmitriyAlergant · 11 months ago

+1

A default generic purpose agent MUST inherit the base model, anything else makes the subagent task unuseable in environments where claude was run against a custom model.

DmitriyAlergant · 11 months ago

https://docs.anthropic.com/en/docs/claude-code/model-config

Apparently this is controllable by 4 env vars:

ANTHROPIC_DEFAULT_OPUS_MODEL | The model to use for opus, or for opusplan when Plan Mode is active.
ANTHROPIC_DEFAULT_SONNET_MODEL | The model to use for sonnet, or for opusplan when Plan Mode is not active.
ANTHROPIC_DEFAULT_HAIKU_MODEL | The model to use for haiku, or background functionality
CLAUDE_CODE_SUBAGENT_MODEL | The model to use for subagents

github-actions[bot] · 8 months ago

This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.

github-actions[bot] · 7 months ago

This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.

github-actions[bot] · 7 months ago

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.