[BUG] Opus 4.8 compaction fails with "context window" error at low context usage — Opus 4.7 works in the same conversation
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?
What's wrong?
On Claude Opus 4.8, conversation compaction fails immediately with a context-window / compaction error, even when the conversation is well below the context limit. Switching the same conversation to Claude Opus 4.7 fixes it completely — the exact same chat compacts and responds normally.
This points to a model-specific (server-side) issue with Opus 4.8's compaction path, not a client bug and not a genuine context-limit condition.
Why this is NOT the normal context-limit behavior
- Happens on brand-new, nearly empty chats and on older chats that are not actually full (small content, context usage clearly well below the limit).
- The same chats, on the same devices, work flawlessly on Opus 4.7 — no compaction error, normal responses.
- Reproduces identically across two fully independent clients: Claude Code on Windows and the mobile app. The only thing those share is the account + backend, so the cause is server/model-side, not local.
- A full app restart,
/clear, and/doctordo not help on 4.8./doctorworks fine on 4.7.
Actual behavior
Opus 4.8 throws a compaction / context-window error immediately and blocks the conversation. Only switching to 4.7 (or /clear, which loses the session) recovers it.
Environment
- Claude Code version: Claude for Windows Version 1.15200.0 (250bae)
- Subscription: Max 20x
- OS: Windows 11 (latest) so reproduced on the mobile app (Android, Samsung Ultra Ai, latest Android version), all fully updated
- Model that fails: Claude Opus 4.8 Max
- Model that works: Claude Opus 4.7 Max
Notes
- Possibly related to #63197 (compaction failing with a context-window error at low usage), but that report is not isolated to a specific model. This report adds the isolation: 4.8 fails, 4.7 works in the same chat.
- At the time of failure, the status page showed all systems operational, so this may not be captured by current monitoring.
What Should Happen?
Opus 4.8 should respond normally and only compact when actually near the context limit — exactly as Opus 4.7 does in the identical conversation.
Error Messages/Logs
> This conversation can't be compacted any further. Start a new chat to continue.
Steps to Reproduce
- Select model Claude Opus 4.8.
- Start a new conversation, or open an existing one that is below the context limit. Send a short message (e.g. "how are you?").
- The compaction / context-window error appears immediately, even though context usage is low.
- Switch the same conversation to Claude Opus 4.7 and send the same message.
- It responds normally, no compaction error.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
1.15200.0 (250bae)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗