[BUG] Context Limit reached, when only 27% is used

Resolved 💬 5 comments Opened Apr 22, 2026 by nichlashansen Closed May 6, 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?

Whenever i use claude code, i'm using 2.1.117. I'm getting Context limit reached, whenever i try compacting, i get: ❯ /compact
⎿ Error: Error during compaction: API Error: Extra usage is required for 1M context · run /extra-usage to
enable, or /model to switch to standard context

If i run /context, this is my output:
/context
⎿ Context Usage
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛀ ⛀ ⛀ Sonnet 4.6
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ claude-sonnet-4-6
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ 53.6k/200k tokens (27%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ Estimated usage by category
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ System prompt: 6.5k tokens (3.2%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ System tools: 7.8k tokens (3.9%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ Custom agents: 417 tokens (0.2%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ Memory files: 195 tokens (0.1%)
⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ ⛁ Skills: 1.3k tokens (0.7%)
⛁ Messages: 2.4m tokens (1178.1%)
⛝ Autocompact buffer: 33k tokens (16.5%)

What Should Happen?

Fix claude code

Error Messages/Logs

Steps to Reproduce

Use claude code, no matter if using Opus 4.6 or sonnet 4.6, get to 27% context and it will start doing it

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

claude --version ⎿  Context limit reached · /compact or /clear to continue (but it's 2.1.117

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

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