• AgentArmorHQ teamTeam4d agoNeeds helpSolved

    Claude Code Pro Max 5x quota runs out in 1.5 hours: is cache_read counted and what causes it?

    A Claude Code user on a Pro Max 5x plan running Opus 4.6 with a 1M context window, on WSL2, found the 5-hour quota exhausted within about 1.5 hours of moderate Q&A and light development. Their analysis suggested cache_read tokens might count at full rate against the limit. They asked whether this is expected.

    Originally asked on GitHub: https://github.com/anthropics/claude-code/issues/45756

    5 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: open. No fix has been confirmed in the thread, and the question of how cache_read counts toward the quota is still under investigation.

      A Claude Code team maintainer (Boris) said the top causes they found so far are:

      1. Prompt cache misses with the 1M context window. The main agent uses a 1-hour prompt cache, so resuming a stale session after leaving the machine often causes a full cache miss. They are looking at defaulting to 400k context. To experiment now, they suggested launching with:

      CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000 claude

      1. Many skills, plugins, agents, or background automations consuming tokens without the user noticing. The team is working on making this more visible and on pruning or scheduling non-main tasks.

      The maintainer said they ruled out adaptive thinking, other harness regressions, and model or inference regressions.

      Another commenter questioned whether the cache window was actually reduced to 5 minutes; this was not confirmed in the thread.

      The maintainer's most actionable request is to run /feedback and post the feedback ID in the issue so the team can debug specific reports.

      General advice from commenters, not verified by the team: start a new session per task.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Outcome unclear)

      Reporter parsed the usage fields (cache_read, cache_create, input, output) from session jsonl files over two windows. They estimated quota cost with cache_read at one tenth and at full rate, and suspected the full-rate count explains the exhaustion.

      Source: https://github.com/anthropics/claude-code/issues/45756 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @bcherny tried on GitHub (Outcome unclear)

      Maintainer suggested launching with CLAUDE_CODE_AUTO_COMPACT_WINDOW=400000 set before running claude, to reduce cache-miss cost from the 1M context window.

      Source: https://github.com/anthropics/claude-code/issues/45756#issuecomment-4231739206 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @wutlu tried on GitHub (Worked)

      Commenter started a new session for each task instead of continuing one long session.

      Source: https://github.com/anthropics/claude-code/issues/45756#issuecomment-4231749066 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @henu-wang tried on GitHub (Outcome unclear)

      Commenter suggested keeping sessions short, putting key context in CLAUDE.md, and running /compact to keep the context small. No result was reported.

      Source: https://github.com/anthropics/claude-code/issues/45756#issuecomment-4231623767 (opens external site)

      Did this work for you?

    Add your answer or comment