[BUG] 1M context required error on active session — Max plan, Sonnet 4.6 High Effort, v2.1.157

Resolved 💬 5 comments Opened May 30, 2026 by mmagana Closed Jul 12, 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?

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported in the same exact combination
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

Bug Description

On an active session running for ~4 hours, Claude Code returned the following error mid-session:

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

The session was not freshly started — it had been running for approximately 4 hours. No model change was made by the user during the session.

Environment Info

  • Platform: macOS (Apple Silicon)
  • Claude Code version: v2.1.157
  • Plan: Max (×5)
  • Model selected: claude-sonnet-4-6 — High Effort
  • Session type: Long-running active session (~4 hours)
  • Terminal: zsh (native)

Expected Behavior

On a Max plan, 1M context should be included without requiring Usage Credits to be enabled, as documented. An active session should not suddenly begin requiring credits that were not required when the session started.

Actual Behavior

Mid-session error blocking further prompts. The error message suggests the session silently escalated to 1M context after ~4 hours, which triggered the credit requirement — without any user action or model switch.

Steps to Reproduce

  1. Start a Claude Code session on Max plan with Sonnet 4.6 (High Effort)
  2. Work in the session for several hours without changing the model
  3. At some point mid-session, the error appears without warning

Workaround

Running /model to switch to standard context resolves the immediate block, but should not be required on a Max plan.

Related Issues

Likely related to: #62063, #61869, #60707, #62199

What Should Happen?

Expected Behavior

On a Max plan, 1M context should be included without requiring Usage Credits to be enabled, as documented. An active session should not suddenly begin requiring credits that were not required when the session started.

Error Messages/Logs

On an active session running for ~4 hours, Claude Code returned the following error mid-session:


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


The session was not freshly started — it had been running for approximately 4 hours. No model change was made by the user during the session.

Steps to Reproduce

Steps to Reproduce

  1. Start a Claude Code session on Max plan with Sonnet 4.6 (High Effort)
  2. Work in the session for several hours without changing the model
  3. At some point mid-session, the error appears without warning

Workaround

Running /model to switch to standard context resolves the immediate block, but should not be required on a Max plan.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

v2.1.157

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

IntelliJ IDEA terminal

Additional Information

_No response_

View original on GitHub ↗

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