claude-code - 💡(How to fix) Fix [Bug] CLAUDE_CODE_FORK_SUBAGENT=1 causes non-fork agents to be super expensive [4 comments, 4 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#52833Fetched 2026-04-25 06:19:41
View on GitHub
Comments
4
Participants
4
Timeline
8
Reactions
0
Timeline (top)
commented ×4labeled ×4

Code Example

[]
RAW_BUFFERClick to expand / collapse

Bug Description With CLAUDE_CODE_FORK_SUBAGENT=1 it seems like regular Agents (not forks) eat up my usage extremely quickly, i.e. two ~200k token agents using most of my 5 hour limit on the MAX 20x plan. I suspect they break the cache or don't use it properly

Environment Info

  • Platform: darwin
  • Terminal: WezTerm
  • Version: 2.1.119
  • Feedback ID: 762fea3f-fff2-47d7-b78f-fc3689f3eee5

Errors

[]

extent analysis

TL;DR

Investigate the caching behavior of regular Agents when CLAUDE_CODE_FORK_SUBAGENT=1 to prevent excessive usage consumption.

Guidance

  • Review the documentation for CLAUDE_CODE_FORK_SUBAGENT to understand its impact on caching and usage limits.
  • Monitor the usage patterns of regular Agents with and without the CLAUDE_CODE_FORK_SUBAGENT=1 flag to identify potential caching issues.
  • Consider testing with a smaller token limit to see if the issue persists and to better understand the relationship between token size and usage consumption.
  • Check if there are any known issues or limitations with the MAX 20x plan that could be contributing to the rapid usage depletion.

Notes

The issue lacks specific details about the caching mechanism and its interaction with the CLAUDE_CODE_FORK_SUBAGENT flag, making it difficult to provide a definitive solution.

Recommendation

Apply workaround: Temporarily disable the CLAUDE_CODE_FORK_SUBAGENT=1 flag to see if it mitigates the issue, while investigating the caching behavior and potential plan limitations.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [Bug] CLAUDE_CODE_FORK_SUBAGENT=1 causes non-fork agents to be super expensive [4 comments, 4 participants]