Auto-compact does not fire before session usage limit is hit (Windows)

Resolved 💬 2 comments Opened Apr 20, 2026 by JeremyFriesen Closed Apr 20, 2026

Summary

Auto-compact consistently fails to fire before the session usage limit is reached on Windows. When the limit is hit, the session cannot be manually compacted either (requires enabling paid overage to proceed). Auto-compact fires reliably on Linux (same account) and macOS (different account).

Environment

  • Claude Code version: 2.1.113
  • OS: Windows 10 Home (10.0.19045)
  • Surfaces affected: VS Code extension + CLI (both installed, both reproduce)
  • Plan: Max (5x)

Behavior

  1. A development session runs — heavy tool use (file reads, edits, shell commands, subagents)
  2. Session usage limit is hit with no compaction activity observed in the transcript
  3. Error is returned: session has reached the 1m token limit, no further work possible
  4. Attempting /compact at this point fails with the same error
  5. Enabling "extra usage" (paid overage), running /compact, then disabling extra usage allows the session to continue

The session usage page (claude.ai/settings/usage) showed ~15% session usage when the error occurred, confirming the session allocation was not exhausted — yet no further requests were accepted.

Expected Behavior

Auto-compact should fire automatically before the session usage limit is reached, keeping the context lean enough that the limit is not hit mid-session. This behaviour is observed on Linux (same account, same Claude Code version) and macOS (different account).

Additional Context

  • No DISABLE_COMPACT environment variable is set
  • No compaction-related overrides in settings
  • The issue is reproducible across multiple sessions on this machine
  • The manual /compact workaround requires paid overage tokens to execute, making the failure costly

View original on GitHub ↗

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