[BUG] Context window freeze before auto-compaction triggers (Claude Sonnet 4.6, Cursor)

Resolved 💬 4 comments Opened Feb 19, 2026 by VoltAndy Closed Feb 23, 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?

During long agentic sessions, Claude Code freezes completely before auto-compaction triggers. The UI becomes unresponsive — no tool calls, no output, no error message. The only recovery is closing and restarting Cursor. This has happened on two consecutive days (2026-02-18 and 2026-02-19).

What Should Happen?

Auto-compaction should trigger before the context ceiling is reached. If compaction fails, Claude Code should surface an error or warning rather than
silently freezing.

Error Messages/Logs

No error message is displayed. Claude stops producing output mid-session with no indication of failure. In the most recent occurrence, the context meter  
  showed approximately 11% remaining when the freeze occurred — auto-compaction did not trigger.

Steps to Reproduce

  1. Open Claude Code in Cursor using model claude-sonnet-4-6
  2. Run a context-heavy multi-step skill that involves: reading large JSON files, multiple parallel web searches, and writing to external systems via MCP

tools

  1. Continue through multiple steps without manually running /compact
  2. Observe: Claude stops responding entirely mid-session with no output, no tool activity, no error

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.47

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Cursor

Additional Information

  • Model: claude-sonnet-4-6
  • OS: Windows 11 Home (10.0.26200)
  • Reproducible: yes — occurred on two consecutive days in similar session types
  • Workaround: running /compact manually earlier in the session appears to prevent it
  • The freeze appears to happen before the auto-compaction threshold, not at it. Possible causes: threshold calculation is off, the compaction process

fails silently, or a heavy parallel tool call batch pushes over the limit before compaction can intervene

View original on GitHub ↗

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