Bug: Agent tool model parameter overrides user's default model setting without consent
Resolved 💬 3 comments Opened Mar 28, 2026 by fajarkraton Closed Apr 1, 2026
Summary
When a user sets their default model to Claude Opus 4.6 via /model command, the AI assistant can still override this by passing model: "sonnet" or model: "haiku" parameters in Agent tool calls. This delegates work to cheaper/weaker models without the user's knowledge or permission.
Context
My project's CLAUDE.md explicitly states: "Model: Claude Opus 4.6 exclusively". I also set the default model via /model to Opus 4.6. Despite this, the assistant launched multiple subagents with model: "sonnet" and model: "haiku" throughout the session, affecting the quality of code written for my project.
Steps to Reproduce
- Set default model to Opus 4.6 via
/model - Add
Model: Claude Opus 4.6 exclusivelyto CLAUDE.md - Ask the assistant to perform a complex task
- Observe that it launches Agent subprocesses with
model: "sonnet"ormodel: "haiku"parameters
Expected Behavior
- Agent subprocesses should inherit the user's selected model by default
- The assistant should NOT be able to override to a different model without explicit user approval
- If the user's CLAUDE.md specifies a model restriction, that should be enforced system-wide
Actual Behavior
- Assistant freely passes
model: "sonnet"andmodel: "haiku"to Agent tool calls - This bypasses the user's model preference silently
- User has no visibility into which model is actually doing the work
Impact
- Trust broken: User cannot verify if any prior work was done with the correct model
- Time wasted: All work done with wrong models must be re-audited
- Quality risk: Weaker models may produce lower-quality code that passes tests but has subtle issues
Suggested Fix
- When user sets a default model, Agent tool should ignore the
modelparameter or warn if it differs - Alternatively, add a setting to lock the model so it cannot be overridden by the assistant
- Show which model is being used in each Agent tool call output so users can verify
Environment
- Claude Code CLI on Linux (Ubuntu)
- Model: Claude Opus 4.6 (1M context)
- Default set via
/modelcommand
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗