[BUG] Default Model Not Updating Correctly After Switching

Resolved 💬 5 comments Opened Jul 17, 2025 by ruijayfeng Closed Aug 20, 2025

Problem Description

When using claude, after switching the model using the /model command, the default model does not update correctly upon re-entering claude. The specific steps and issue are as follows:

  1. Initial State: Enter claude, and the default model is opus.
  2. Switch Model: Use the /model sonnet command to switch the model to sonnet.
  3. Re-enter: Exit and re-enter claude, and the default model is still opus, not the previously switched sonnet.
  4. Manual Fix: It is necessary to manually edit the setting.json file in the .claude directory to set the default model to sonnet.

Expected Behavior

  • After switching the model using the /model command, the default model should automatically be the one previously switched to, without needing to manually edit the configuration file.

Current Behavior

  • Every time claude is entered, the default model is always opus, even after switching the model using the /model command.

Environment Information

  • Operating System: Ubuntu 20.04
  • claude Version: lasted

Reproduction Steps

  1. Enter claude.

``
$ claude
``

  1. Check the current default model:

``
$ /model
``

Output:

``
Current model: opus
``

  1. Switch the model to sonnet:

``
$ /model sonnet
``

Output:

``
Model switched to sonnet
``

  1. Exit claude.

``
$ exit
``

  1. Re-enter claude.

``
$ claude
``

  1. Check the current default model again:

``
$ /model
``

Output:

``
Current model: opus
``

Temporary Solution

  • Manually edit the setting.json file in the .claude directory to set the default model to sonnet.

Impact of the Issue

  • Poor user experience, as users need to manually edit the configuration file each time they enter claude.
  • There may be an issue with the configuration file not updating correctly or a problem with the command logic.

Priority

  • Medium

View original on GitHub ↗

This issue has 5 comments on GitHub. Read the full discussion on GitHub ↗