/model command does not persist: Claude Code reverts to Sonnet 1M context (paid credits) despite selecting default Sonnet 4.6

Resolved 💬 2 comments Opened Jun 7, 2026 by cespinoa Closed Jul 14, 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?

Description

After working normally, Claude Code starts returning the following error on every message, regardless of content or file size:

API Error: Usage credits required for 1M context · run /usage-credits to turn them on, or /model to switch to standard context

Running /model and selecting "Default (recommended) ✔ Sonnet 4.6" (option 1) does not resolve the issue. The error persists even after confirming the selection. The session continues to use the Sonnet 1M context model and consumes paid usage credits.

Environment

  • Claude Code version: 2.1.167
  • OS: Linux
  • Plan: Claude Pro
  • ANTHROPIC_MODEL env variable: not set

Steps to reproduce

  1. Start a working session with the default Sonnet 4.6 model
  2. At some point during the session, every new message triggers the error above
  3. Run /model → select option 1 (Default Sonnet 4.6) → confirm with Enter
  4. Error persists — model selection is ignored, session continues on 1M context
  5. Repeating /model multiple times has no effect

Actual behavior

The /model command reports the model as changed, but the active session continues using Sonnet 4.6 with 1M context, consuming paid usage credits on every message.

Expected behavior

Selecting "Default Sonnet 4.6" via /model should immediately switch the active session to standard context (200k) and stop consuming usage credits.

Workaround

The following sequence unblocks the session:

  1. Run /model and switch to Haiku (option 4)
  2. Claude Code compacts the conversation at that point
  3. Run /model again and switch back to Default Sonnet 4.6
  4. The pending task resumes normally without the error

The compaction step appears to be the key — simply switching models without it does not resolve the issue.

Impact

Users on paid plans are unknowingly billed for 1M context usage credits during the stuck session. The error message suggests activating usage credits as a solution, which may lead users to increase their spending limit unnecessarily.

What Should Happen?

Not response, blocked

Error Messages/Logs

Steps to Reproduce

Some instruction

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.167 (Claude Code)

Platform

Anthropic API

Operating System

Ubuntu/Debian Linux

Terminal/Shell

Xterm

Additional Information

_No response_

View original on GitHub ↗

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