Real example · Build apps (vibe coding)
Compacting an idle 602k-token Claude Code session after cache expiry burned 100% of the 5-hour Pro limit
Also used: OpenAI Codex, Cursor
What they did
Multiple Claude Code Pro users on r/ClaudeAI reported returning to a long coding thread after an overnight or 5-hour break, running /compact (or hitting auto-compaction), and losing 100% of their 5-hour usage quota in under two minutes without generating a single line of code.
How it went
Because Anthropic prompt cache expires after roughly 1 hour of inactivity, resuming and compacting a 602k-token session re-sends the full context at uncached token rates. Developers solved it by compacting before leaving while the cache is warm, setting CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000, or writing a rolling HANDOFF.md file to continue in a fresh session or hand off to Codex or Cursor.
Worth knowing
Community bug reports and workarounds on r/ClaudeAI; Anthropic subsequently shipped idle-compaction warnings in Claude Code v2.1.299–v2.1.311, though cold-cache resumes on large contexts still consume significant quota.
Try it yourself with Claude Code
Replace anything in [brackets] with your details.
Before we pause this coding session (or switch agents), write HANDOFF.md at the repository root with: 1) Goal, 2) Completed commits, 3) In-progress files, 4) Single next action, 5) Test/lint command output, and 6) Constraints not to break. Do not include secrets or .env values. Read the original
How is it that I just logged in to Claude Code this morning, /compact a session from yesterday (16h ago), and use 100% of my 5hr limit? (r/ClaudeAI) ↗
reddit.com · · Reddit thread
Attributed to the source linked below; not our own test.
Share Share on WhatsApp