[BUG] Selecting model with /model deletes content of settings.json

Resolved 💬 11 comments Opened Jul 7, 2025 by dre-on Closed Jan 5, 2026

Environment

  • Platform (select one):
  • [ ] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [x] Other: Claude Max
  • Claude CLI version: 1.0.43 (Claude Code)
  • Operating System: macos 15.5
  • Terminal: zish shell - iTerm, Ghostty, vscode terminal - same issue

Bug Description

When selecting the model with /model, everything in ~/.claude/settings.json gets replaced with model key value in case of opus or sonnet or just empty {} in default case.

So settings.json is left with just {} or

{
  "model": "<sonnet or opus>"
}

Steps to Reproduce

  1. Start claude code CLI with default claude (or any flag really)
  2. Select model with /model
  3. Check ~/.claude/settings.json

Expected Behavior

Only model should change in settings when selecting model with /model

Actual Behavior

Any other settings that are not model selection gets removed and only model is left

Additional Context

Launching with --model <modelname> does not affect the settings.json file.

View original on GitHub ↗

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