[Bug] Dialog compaction causes extended freeze with excessive token consumption

Resolved 💬 6 comments Opened Dec 24, 2025 by trofimovm Closed Feb 14, 2026

Bug Description
Bug Report: Claude Code Freezing During Dialog Compaction - Excessive Token Consumption

Summary:
Claude Code (version 2.0.76) froze during automatic dialog compaction for 20-30 minutes, resulting in excessive and unproductive token consumption (~75% of current session limit).

Environment:

  • Claude Code version: 2.0.76
  • Operating System: macOS
  • Installation: /Users/user1/.local/bin/claude
  • Date: December 24, 2025 (approximately)

Issue Description:
While executing a task in Claude Code, the system initiated automatic dialog compaction. During this process, Claude Code became completely unresponsive and hung for approximately 20-30 minutes. Throughout this frozen state, the system continued consuming tokens at a high rate without performing any actual computation or returning results.

Token Consumption Impact:

  • Current session limit: jumped from 20% to 95% (during the freeze)
  • Weekly usage limit: increased from 10% to ~30%
  • All token consumption occurred while the system was unresponsive
  • No productive work was completed during this time

Observed Behavior:

  1. Started legitimate task execution
  2. Dialog compaction process initiated automatically
  3. UI/CLI became unresponsive
  4. Application continued consuming tokens for 20-30 minutes
  5. System did not return error messages or status updates
  6. Had to forcibly terminate or wait for timeout

Expected Behavior:

  • Dialog compaction should either happen in the background with minimal disruption, or
  • The system should gracefully handle the compaction without freezing, or
  • If compaction fails, it should provide clear error messages and stop token consumption

Severity: High

  • Blocks user work for extended periods
  • Wastes significant token allocation on non-productive operations
  • No user control to interrupt or cancel the process

Additional Notes:
This appears to be a system malfunction rather than normal usage pattern. The token consumption is directly tied to a system error, not legitimate computational work.

Would appreciate investigation into:

  1. Why dialog compaction causes system freeze
  2. Why tokens continue to be consumed during unresponsive state
  3. Possible recovery mechanisms or safeguards

Environment Info

  • Platform: darwin
  • Terminal: Apple_Terminal
  • Version: 2.0.76
  • Feedback ID:

Errors

[{"error":"Error\n    at ak (/$bunfs/root/claude:59:1144)\n    at <anonymous> (/$bunfs/root/claude:60:10093)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:62:2149)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-23T21:03:51.098Z"},{"error":"Error\n    at ak (/$bunfs/root/claude:59:1144)\n    at <anonymous> (/$bunfs/root/claude:60:10093)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:62:2149)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-23T21:03:51.109Z"},{"error":"AbortError: The operation was aborted.\n    at unknown\n    at abortChildProcess (node:child_process:935:42)\n    at onAbortListener2 (node:child_process:35:24)\n    at abort (unknown)\n    at <anonymous> (/$bunfs/root/claude:4704:2171)","timestamp":"2025-12-23T22:02:14.242Z"},{"error":"MaxFileReadTokenExceededError: File content (25795 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at Bw_ (/$bunfs/root/claude:957:12204)\n    at async call (/$bunfs/root/claude:966:1005)\n    at async Qo7 (/$bunfs/root/claude:2142:17437)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-23T22:33:44.464Z"},{"error":"Error: Request was aborted.\n    at _createMessage (/$bunfs/root/claude:458:3157)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-23T23:05:53.953Z"},{"error":"Error\n    at ak (/$bunfs/root/claude:59:1144)\n    at <anonymous> (/$bunfs/root/claude:60:10093)\n    at emit (node:events:92:22)\n    at endReadableNT (internal:streams/readable:861:50)\n    at processTicksAndRejections (native:7:39)\n    at request (/$bunfs/root/claude:62:2149)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-23T23:12:53.866Z"},{"error":"MaxFileReadTokenExceededError: File content (25165 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read specific portions of the file, or use the GrepTool to search for specific content.\n    at Bw_ (/$bunfs/root/claude:957:12204)\n    at processTicksAndRejections (native:7:39)","timestamp":"2025-12-23T23:46:39.407Z"},{"error":"MaxFileReadTokenExceededError: File content (25165 tokens) exceeds maximum allowed tokens (25000). Please use offset and limit parameters to read s

Note: Error logs were truncated.

View original on GitHub ↗

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