/model: add session-only flag to avoid overwriting saved default
Status Fixed / completed
Maintainer reply ✓ Yes — bcherny
Workaround ✓ Mentioned in description ↑
Activity 3 comments · opened Jul 13, 2026 · closed Aug 17, 2026
💡 Likely answer: A maintainer (bcherny, collaborator)
responded on this thread — see the highlighted reply below.
Problem
Running /model <name> inside a session both switches the active model and saves it as the default for new sessions. There's no way to temporarily switch models mid-session without overwriting settings.json.
Expected behavior
A way to switch the model for the current session only, leaving the saved default untouched. For example:
- A flag:
/model --session claude-opus-4-8 - Or a separate command:
/model:session <name>
Current workaround
None known. Even setting ANTHROPIC_MODEL env var, /model still writes the new default.
Use case
Switching to a more capable model for one complex task, then having the next session start with the usual (cheaper/faster) default — without manually resetting it each time.
3 Comments
I agree. In a recent update,
/modelwas changed from changing only the session model to changing the default model, unless you use 's' to set as session only.A side-effect of that change is that
/model opuschanges the default model as one can't specify that it's session-only.Previously I could use
keybindings.json, but the binding stopped working in a recent update.This is already possible: open the
/modelpicker, highlight the model you want, and presssinstead ofEnter.sswitches the model for the current session only and leaves your saved default untouched (Enterand typing/model <name>directly save it as the default).claude --model <name>at launch is also session-only.Docs: https://code.claude.com/docs/en/model-config#setting-your-model
🤖 Generated with Claude Code
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.