[BUG]Model selection not persisting in VSCode extension - silently falls back to Sonnet

Resolved 💬 3 comments Opened Apr 25, 2026 by hyades72 Closed Apr 29, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Body:

Version: 2.1.120 (darwin-arm64)

Environment: VSCode extension (not CLI)

Bug:

/model claude-opus-4-7 command returns "isn't available in this environment"
Adding "model": "claude-opus-4-7" to ~/.claude/settings.json gets silently reverted by the extension on every write
No visible indicator that the model selection failed — UI shows nothing wrong
Result: Spent 50% of weekly usage on Sonnet while believing Opus was active
Expected: Either the model setting should persist, or there should be a clear error/warning when the selected model cannot be applied.

Steps to reproduce:

Open Claude Code in VSCode extension
Try /model claude-opus-4-7 → error
Manually add "model": "claude-opus-4-7" to ~/.claude/settings.json
Extension reverts the field silently
All subsequent sessions run on Sonnet with no warning

What Should Happen?

Body:

Version: 2.1.120 (darwin-arm64)

Environment: VSCode extension (not CLI)

Bug:

/model claude-opus-4-7 command returns "isn't available in this environment"
Adding "model": "claude-opus-4-7" to ~/.claude/settings.json gets silently reverted by the extension on every write
No visible indicator that the model selection failed — UI shows nothing wrong
Result: Spent 50% of weekly usage on Sonnet while believing Opus was active
Expected: Either the model setting should persist, or there should be a clear error/warning when the selected model cannot be applied.

Steps to reproduce:

Open Claude Code in VSCode extension
Try /model claude-opus-4-7 → error
Manually add "model": "claude-opus-4-7" to ~/.claude/settings.json
Extension reverts the field silently
All subsequent sessions run on Sonnet with no warning

Error Messages/Logs

Steps to Reproduce

Open Claude Code in VSCode extension
Try /model claude-opus-4-7 → error
Manually add "model": "claude-opus-4-7" to ~/.claude/settings.json
Extension reverts the field silently
All subsequent sessions run on Sonnet with no warning

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.120

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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