Context hit 1M token limit with no auto-compaction and no recovery path

Resolved 💬 4 comments Opened May 30, 2026 by zpostfacto Closed Jul 7, 2026

Bug description

During a normal coding session, the conversation context grew to the 1M token limit without auto-compaction triggering. When the limit was hit, the error message was about requiring more credits to use 1M context — misleading, since the user never opted into extended context. Manual /compact was also unavailable or broken at that point, leaving the user stranded with no way to continue the session.

Expected behavior

  • Auto-compaction should trigger before hitting the 1M limit
  • If auto-compaction fails, /compact should still be available as a fallback
  • If the limit is hit, the error should offer a recovery path (e.g., "run /compact"), not a billing/credits message

Actual behavior

  • Context grew to 1M without auto-compaction firing
  • /compact was not usable when needed
  • Error message referenced credits/billing for 1M context, which is confusing and unhelpful
  • User was forced to start a new conversation, losing session context

Environment

  • Claude Code version: 2.1.158
  • OS: Linux (WSL2)
  • Model: claude-sonnet-4-6

Impact

High — basic session continuity broken, user loses all conversation context mid-task with no recovery option.

View original on GitHub ↗

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