Auto-compact does not fire before session usage limit is hit (Windows)
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
- A development session runs — heavy tool use (file reads, edits, shell commands, subagents)
- Session usage limit is hit with no compaction activity observed in the transcript
- Error is returned: session has reached the
1mtoken limit, no further work possible - Attempting
/compactat this point fails with the same error - 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_COMPACTenvironment variable is set - No compaction-related overrides in settings
- The issue is reproducible across multiple sessions on this machine
- The manual
/compactworkaround requires paid overage tokens to execute, making the failure costly
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗