[BUG] Context compression fires after ~5 messages on 1M context Opus model

Resolved 💬 3 comments Opened Apr 2, 2026 by jasonsydes Closed Apr 2, 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?

Conversation history disappears from scrollback (context compression fires) after only ~5 messages in a brand new session on the 1M context Opus model. All prior conversation — including user prompts and assistant responses — vanishes from the terminal scrollback. The user can only see from the most recent assistant message onward.

What Should Happen?

With 1M context, compression should not fire this early. The total conversation content at the point of compression was well under 20K tokens. Users should be able to scroll back through the full conversation history for at least many rounds of interaction.

Steps to Reproduce

  1. Start a fresh Claude Code session with Opus 4.6 (1M context)
  2. Run a skill/command that reads a few small files (in my case, /open ghee which reads 2 small text files and lists ~12 files)
  3. Brief back-and-forth exchange (1-2 user messages, short assistant responses)
  4. Launch 2 named Sonnet subagents via Agent tool, each returning ~500-800 words of structured results
  5. Post a summary response synthesizing the subagent results

After step 5, all prior conversation history (steps 1-3) is gone from scrollback. Only the final assistant summary message is visible.

Claude Model

Opus 4.6 (1M context) — model ID: claude-opus-4-6[1m]

Is this a regression?

I don't know

Claude Code Version

2.1.90

Platform

Anthropic API (Claude Max subscription)

Operating System

macOS (Darwin 25.3.0)

Terminal/Shell

iTerm2 / bash

Additional Information

Speculation on cause: Possible that named subagent (Agent tool) results are being double-counted toward the context budget, or that the compression threshold isn't correctly calibrated for the 1M context variant. The subagent results were moderate in size (~500-800 words each) but compression fired immediately after they were incorporated.

The conversation was approximately: /open ghee command → read 2 small llms.txt files → user asked about code review files → glob listed 12 files → user asked for environment config investigation → 2 Sonnet subagents launched and returned → summary posted → all prior history gone.

View original on GitHub ↗

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