Feature request: Automatic model selection based on task complexity
Open 💬 2 comments Opened Jun 19, 2026 by FrossGus
Feature Request
Summary: Allow Claude Code to automatically select the appropriate model based on the detected task type or complexity.
Current behavior
The model is fixed at session start and does not change throughout the session. Users must manually specify the model via --model flag or settings.json.
Desired behavior
Claude Code could analyze the incoming prompt and automatically select the most appropriate model:
- Simple tasks (quick questions, small edits, explanations) →
claude-haiku(faster, cheaper) - Standard tasks (code changes, debugging, refactoring) →
claude-sonnet(balanced) - Complex tasks (large refactors, architecture design, multi-file changes) →
claude-opus(most capable)
Use case
When working on a project, task complexity varies significantly between prompts. Having to manually switch models breaks the workflow. An automatic selection (with user-configurable rules or thresholds) would improve both cost efficiency and response quality without user intervention.
Possible implementation ideas
- A
autoModelSelection: truesetting insettings.json - User-configurable rules mapping task keywords/patterns to models
- A
UserPromptSubmithook that could return a model override for the current turn
Environment
- Claude Code version: 2.45.0
- Platform: WSL2 / Linux
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗