claude-code - 💡(How to fix) Fix [BUG] 1M context required error on active session — Max plan, Sonnet 4.6 High Effort, v2.1.157

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

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

Fix Action

Workaround

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

Code Example

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

---

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.
RAW_BUFFERClick to expand / collapse

Preflight Checklist

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

What's Wrong?

Preflight Checklist

  • I have searched existing issues and this hasn't been reported in the same exact combination
  • This is a single bug report
  • 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

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] 1M context required error on active session — Max plan, Sonnet 4.6 High Effort, v2.1.157