[BUG] If model is globally configured to Opus and limit is hit, websearch and compaction will fail

Resolved 💬 5 comments Opened Oct 8, 2025 by p4fg Closed Jan 7, 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?

% claude --version
2.0.10 (Claude Code)

If i have opus configured as the model in ~/.claude/settings.json

{
  "model": "opus"
}

That model will be used for web-search and conversation compaction, even though i have switched the model for the setting (using /model) to sonet.

The will make web-searches and conversation compact to fail, rendering the session useless.

This is what happens when we run out of context:

This session is being continued from a previous conversation that ran out of context. The conversation is summarized below:
Opus weekly limit reached ∙ resets Oct 9, 8am.
Please continue the conversation from where we left it off without asking the user any further questions. Continue with the last task that you were asked to work on.

Context is lost.

What Should Happen?

Claude should detect Opus limit reached and try Sonet instead. (or use the session-model for all these calls)

Error Messages/Logs

This session is being continued from a previous conversation that ran out of context. The conversation is summarized below:
Opus weekly limit reached ∙ resets Oct 9, 8am.
Please continue the conversation from where we left it off without asking the user any further questions. Continue with the last task that you were asked to work on.

Steps to Reproduce

  1. Set ~/.claude/settings.json to
{
  "model": "opus"
}
  1. Reach the Opus weekly limit
  2. Start a new conversation with /model sonet
  3. Reach conversation/context limit and have auto-compact fail
  4. Or use web-search (which also fails with a opus-limit-reached message)

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.10

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

VS Code integrated terminal

Additional Information

_No response_

View original on GitHub ↗

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