Feature: /model command should not auto-persist to default settings
Resolved 💬 1 comment Opened Jun 17, 2026 by dgilford Closed Jun 17, 2026
Problem
When using /model <name> to temporarily switch models in a session, Claude Code automatically persists that choice to ~/.claude/settings.json as the new default. This breaks the mental model that a session-scoped command should only affect the current session.
Current behavior
- Set default model in settings.json to Opus
- Use
/model haikuto test with Haiku for one session - Check settings.json → now shows Haiku as default (unwanted side effect)
Desired behavior
/model <name> should only change the model for the current session and NOT write to settings.json. Users should have a separate way to change their persistent default (e.g., /config model opus or a dedicated --set-default-model flag).
Workaround
Currently, users must use environment variables instead to avoid auto-persistence:
export CLAUDE_CODE_MODEL=opus
This prevents /model from persisting changes, but it's not intuitive.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗