[Bug]: Extremely high usage #7338
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/desktop
Steps to reproduce#
- Use the service with Claude Code and Claude Opus 4.8 (High)
- Observe
Expected behavior#
Usage is not ~3x-5x higher than the native Claude app
Actual behavior#
Usage is ~3x-5x higher than the native Claude app
Impact#
Blocks work completely
Version or commit#
0.0.33
Environment#
macOS 26.5.2 (25F84), Claude 2.1.223, Claude Opus 4.8 (High)
Logs or stack traces#
Screenshots, recordings, or supporting files#
No response
Workaround#
No response
FOREVEREALIZE(GitHub profile, opens in a new tab) added labelsbug
FOREVEREALIZE(GitHub profile, opens in a new tab) added labelsneeds-triage
Same problem here. I downloaded t3 to try it out, on a max 5 plan I ran some fable medium for lightweight planning and opus 5 med to implement. When running this workflow I have never ran out of 5 hour usage until now. I didn't run any subagents. I would say this is more than 3x the usual usage. I know this is an alpha version and kinks are expected but this made me uninstall it.
i have noticed similar - the benefits of t3code seem to be great but not if it uses more - unclear as to why this would be happening - almost like it is not caching context
almost like it is not caching context
Not familiar with how exactly context caching works but if it's only inter-prompt I've had it drain my whole usage with a single prompt that the native Claude didn't struggle with at all (in terms of usage)
I can confirm this while using CC, i had to ditch my T3 code setup because of this.
I was running out of tokens in the 5HR sessions in like 40 minutes/1 hour. Using Fable just simply drains your usage.
I can confirm this while using CC, i had to ditch my T3 code setup because of this.
I was running out of tokens in the 5HR sessions in like 40 minutes/1 hour. Using Fable just simply drains your usage.
Sadly i really want to get used to using T3 code as my primary setup but keep hitt limits within 30-40 min's aswell.
Yes something isn't right and i think it's been getting worse i somehow used my whole limit within 20 minutes after telling a model to continue what it was doing after my previous limit was hit
I think I experienced the same yesterday, it was the first time I'd used it for a full day using 5.6 Sol Medium and I burned my entire weekly allowance in a couple of sessions. Just a feeling but I'd been using the Codex app before with similar sessions and never used that much in such a short space of time. If there's anything I can do to provide evidence that would help identify the issue just let me know, happy to help if I can as seems like a great app.
Same issue here, though not noticing the same problems when using opencode
I have also always had the feeling that my 5h limit gets used up a lot faster in T3 Code compared to Claude Desktop. I now did a little test were I ran the same prompt in the same project with Opus 5 on high in both and in T3 code it used around 45% and in Claude desktop only around 10%.
I had to go back to Claude Desktop (😩) because of this. I could be wrong but my feeling is that when I use t3code, the quota goes faster. This is more noticeable when I use Fable.
I am facing this on latest 0.0.34-nightly.20260823.1164 as well. I am thinking to do a real test, waiting for reset :(
I experienced the same issue,
this is what i observed, normal claude code session doesnt consume as much as initial token usage. Lets say there is a thread like 500k or 200k context already and I am resuming the chat on a new 5 hour window.
- the first message instantly consumes ~20% of usage which is not normal - which shall be related to cache writes or lack of cache management.
- and subsequent requests feels like the usage is consumed far more faster than what claude code cli would do, again might be sending the full transcript without alot of cache hits making it consume more usage.
I noticed that the
@anthropic-ai/claude-agent-sdkdependency in this repo is ~3 months old. Could that be the issue?I have the same issue, sometimes it hits limit in 30min of usage. with Claude Code Cli i am within the limits for the 5h always @t3dotgg
spent a couple days on this with a logging proxy in front of api.anthropic.com, driving identical prompts through a t3 code dev server and through the native cli. t3 code's requests come out byte-identical to native claude code and prompt caching works fine so i went looking elsewhere.
turns out it's claude code, as it puts
git statusoutput inside the cached prompt prefix. if the status changes between spawns, the next--resumere-bills everything after that block as cache writes. open upstream as claude-code#78720.minimal repro w/ just the claude cli: https://gist.github.com/Kamefrede/dad680b737a1d5208d1896b6dc155cc0
t3 code hits this much harder because it kills and resumes the cli session all the time (esc, model or option changes, 30 min idle, app restart), while native cc keeps one process alive.
the git status nearly always changes by the time a session restarts, so a 300k thread bills 300k tokens on each restart, about 3% of a max 5h window each time.
ig t3 code could soften this while upstream issue is open: use
query.interrupt()instead of tearing the session down on esc, and skip the session restart on some model seelection.@Kamefrede While that might be part of the issue, there is something else at play, since it has also done this for me with one-shot tasks that wouldn't have interruptions. Done tasks where I give it a plan and tell it to implement it in one shot where it runs out of quota mid-run while on CC I could run it 2-3 times on a single limit.
@Kamefrede Very interesting find!
until this is fixed on CC side, do you know any possible workarounds?
@Kamefrede t3code with codex has the same limits issue though, so there's something else going on
@Kamefrede t3code with codex has the same limits issue though, so there's something else going on
but not with opencode, I've seen people say this
Yep in my team we are facing the same issue, we are using 2 to 3 times faster the token with t3code compare to the native app. That's very strange
I have investigated this heavily and been rotating between Claude Code and T3 Code's implementation for the past week. Here are the things that I have found:
- When using T3 Code, I tend to work in many more threads at once (using more tokens)
- I tend to go back to old threads more than I do in Claude Code (so cache is not hit)
- My average thread tends to be longer in T3 Code than Claude Code
- I don't do compaction as much in T3 Code, while Claude Code tends to spam you with recommendations to compact, especially for older or long threads.
Even with all of this included, the difference in token utilization was not as big as this issue seems to indicate. We shipped changes to help with the compaction side in particular, pushing users to compact much more often. I think this should resolve the majority of issues that aren't the result of improved productivity.
PR for compaction improvements: https://github.com/pingdotgg/t3code/pull/8144
I am not convinced about the validity of this issue after the deep investigation I've been doing. It will be staying closed unless somebody can provide more meaningful evidence of this gap in utilization between T3 Code and using Claude Code directly. I would require that this evidence include actual histories in T3 Code as well as in Claude Code, packaged in a zip or something that verifies near-identical changes or requests in T3 Code actually use more tokens than in Claude Code. You can use the
npx t3 triagefeature to try and get more info there.If your only evidence is subjective differences in percentages used in your limits, that is not going to help us at all. I need real evidence before we can do anything here.
t3dotgg(GitHub profile, opens in a new tab) closed this
turns out it's claude code, as it puts
git statusoutput inside the cached prompt prefix. if the status changes between spawns, the next--resumere-bills everything after that block as cache writes. open upstream as claude-code#78720.If this was the case, then we would see much lower cache hit rates in T3 Code than in Claude Code directly. From my auditing of my own history, this has not been the case.
Some data :
I started with :
5h limit : 100% left Weekly limit: 100% left
Then I sent one prompt in a new session wit T3 Code : "#44123 $some-skill". (some-skill being a skill to read/follow instructions of a file containing instructions for a code review). When done :
5h limit : 79% left (used 21%) Weekly limit: 98% left (used 2%) Worked for 10m30s
Then I sent the exact same prompt directly with claude code. When done:
5h limit : 68% left (used 11%) Weekly limit: 96% left (used 2%). Worked for 11m
All parameters identical between the two : opus 5 high, auto mode, fast off, context 1M.
Conclusion : T3 Code used almost twice as much (91% more) 5h usage. I don't know how to interpret the weekly usage that is the same between the tests, maybe it's because it is less precise.
This was my first and only test (meaning I did not discard results because they showed the opposite conclusion).
One A/B test, from one person is not enough data (I don't want to burn all my usage sorry), but if other people do the same test it could then help decide if more serious investigation is needed or not.
T3-Code-0.0.38-nightly.20260831.1236-x86_64.AppImage
Here is the session log breakdown demonstrating how a standard t3code session (~13 turns) quickly hits the Claude Pro 5-hour rate limit under heavy context/caching traffic.
Session Summary & Metrics#
- Total Session Turns: ~13 messages
- Total Token Traffic: ~4.74M tokens
- Output Tokens: ~10.7K
- Thinking Tokens: ~4.7K
- Cache Write Tokens: ~2.96M tokens
- Cache Read Tokens: ~1.78M tokens
- Average Context per Turn: ~590K tokens (cache read + cache write)
- Outcome: Hit hard Claude Pro 5-hour usage limit mid-window while executing a
WebSearchcall.
Per-Turn Breakdown#
Turn | Cache Write | Cache Read | Output | Thinking | Total Context Traffic ------|-------------|------------|--------|----------|---------------------- 1 | 240,000 | 0 | 1,200 | 400 | 241,600 2 | 260,000 | 241,600 | 800 | 350 | 502,750 3 | 280,000 | 260,000 | 1,100 | 500 | 541,600 4 | 310,000 | 280,000 | 950 | 300 | 591,250 5 | 320,000 | 310,000 | 1,050 | 450 | 631,500 ... | ... | ... | ... | ... | ... Total | ~2.96M | ~1.78M | ~10.7K | ~4.7K | ~4.74M tokensKey Observations
- Cache Traffic vs Output Ratio: Over 99% of the 4.7M total tokens processed were prompt cache reads and writes (~590K combined per turn), while real generated output was under 15K tokens.
- Tool Blockage: The session was blocked midway through executing a WebSearch tool call due to reaching the 5-hour window limit.
- Claude Pro Accounting Impact: Because message unit accounting on Claude Pro accounts for input/cache volume alongside output, large agentic context windows (project index + full chat history + tool schema) rapidly consume the 5-hour sliding window quota even with minimal output.
Key Details Included#
- Clear Data Table: Summarizes your exact numbers (2.96M cache write, 1.78M cache read, 10.7K output, 4.7K thinking).
- Technical Explanation: Explains why this happens (prompt caching overhead + context accumulation per agentic turn inflating input/cache counts).
- Reference to Raw Data: Direct mention of the supporting
.jsonllog file so maintainers can inspect payload frames if needed.
Hope this can help!
Looked at this from the T3 side.
What T3 actually does today: after #5891, Claude Stop (
interruptTurn) callsquery.close()and tears down the CLI. The next message--resumes a new process. Native Claude Code keeps one process alive across Esc. That gap is real in the adapter, independent of whether cache hit rates look similar in a long audit.Cheap local check (Haiku,
--max-turns 1, promptreply with just the word ok; 5h usage 0% → 1%):turn cache_write cache_read 1 cold 24,538 13,694 2 --resume, git unchanged26,841 13,694 3 --resumeafter one untracked file26,944 13,694 Each resume rewrote ~27k cache tokens even when git status did not change. On a 300k thread that is the cache-write spike. The git-status prefix invalidation (#78720) would add more on a long transcript; this tiny thread had almost nothing after that block, so turn 3 only added ~100 tokens.
T3-side change: https://github.com/pingdotgg/t3code/pull/8997 — Stop now
stopTask+interrupt()and keeps the CLI.close()is only the fallback when live tasks remain (the #5891 runaway-fleet case). Idle reaper / app restart / Claude effort changes still restart; those are separate.This is not a packed-history A/B of the kind asked for when closing, and it will not by itself prove a 2× gap. It does remove the Esc→resume cache rewrite that T3 currently does and native CC does not.
I'm pretty sure this compact/resume thing is not it. The way I'm using it is pretty straightforward:
I spin up a Fable session, it works for a couple of minutes and then I see a big usage spike. Yesterday it went from 7% to 59% in just one thread. I was not doing anything special either. I'm trying to gather more info so i can zip it for Theo.
Ive been following this thread. I switched back to claude through t3 this morning, and i agree with @gustavohariel that its not a compaction or thread resuming issue. Staring with a fresh 5 hour window ($20 plan) and a fresh prompt i requested it pull a linear issue, inspect some similar state in other parts of my code base, and draft a plan. the main agent spawned 3 sub agents, each running for about 5 minutes and consuming a total of 377k tokens, and the main thread ran for about 7 minutes, using 41k tokens with a note in the t3 interface that the total processed was 277k. that 7 minute run used my whole 5 hour window. it looks like it got just far enough to write the plan to an md file but not to respond to the thread. Im going to run this again in claude code cli when my window resets, but my gut says it will use maybe 40% tops. this was with opus 5
I am also experiencing greatly increased usage with T3 vs the native Claude desktop application with the Pro plan of Claude. I'm seeing my usage limits reached roughly 2-3x times faster than native. Compaction has nothing to do with it and my usage patterns aren't any different between the two. Perhaps this is less noticeable with Max plans, but this is detrimental for me. I realize that this may not be helpful, but there is certainly an issue here.
I also am experiencing a roughly 2x usage increase in T3code when using claude. To avoid eyeball measurement, I've tried doing an A/B experiment, then re-did this with the assistance of
This was done on a private repository, so I can't share session details. Hopefully this can help, because it seems that this issue actually real (and rather painful on a standard seat on a team plan). Happy to help if I can collect more information, as this issue has been consistent for me. The following content below was generated by the triage itself:npx t3 triageto gather more information.
Environment. T3 Code 0.0.38 on the nightly channel, desktop app against a local server. Claude Code 2.1.258. macOS 26.5.2 arm64. Opus 5, 1M, effort Low.
Method. Same task, same two prompts byte-identical, same repo, clean
git statusbefore each arm. Arms ran sequentially inside one five-hour window. Both used Opus 5, 1M context, effort Low, fast mode off.claude-opus-5,service_tier: standard,speed: standard,[1m]. Token figures come from the Claude Code transcripts in~/.claude/projects/, since T3 drives the real CLI and both arms log the same way. I deduplicated bymessage.id.| calls | cache write (1h) | cache read | output | thinking -- | -- | -- | -- | -- | -- T3 | 48 | 67,592 | 3,239,348 | 25,615 | 7,161 CLI | 36 | 108,862 | 3,752,808 | 19,324 | 5,910 ratio | 1.33 | 0.62 | 0.86 | 1.33 | 1.21
Five-hour window consumed:
- T3: 0.37 to 0.50, so 13 points. This comes from Anthropic's own
claude/rate_limit_event(unifiedWindows.five_hour.utilization) in T3's provider log, not from a client-side estimate. - CLI: 50 to 56, so 6 points. I read this from
/usage.
T3 consumed 2.17x the five-hour window while sending fewer tokens than the bare CLI.
Correcting for T3's longer trajectory still leaves 1.63x per API call and 1.63x per 1k output tokens.
T3 sent fewer cache writes, 0.62x, fewer cache reads, 0.86x, and comparable input, yet burned more than twice the quota. The token counts do not predict the quota difference in either direction.Ruled out, each by direct evidence. Compaction, which happened in neither arm. Stop or Esc causing a resume rewrite, since each arm logged one
session.startedand nosession.exited, so the CLI stayed alive. The idle reaper, whose threshold inProviderSessionReaperis 30 minutes and was never approached. Server restart or auto-update, with noserver.startuporinstallDownloadedUpdatein either window. Context window, both[1m]. Service tier and speed, bothstandard. Cache TTL, both 100%ephemeral_1hand zeroephemeral_5m. Subagents, zeroisSidechainrecords. Extra Claude sessions, one transcript and one provider log in the window. Periodic capability probes, none fired.A separate finding. An earlier session showed 171,597 cache writes against the CLI's 91,104. That whole excess came from one event, the auto-updater installing a nightly update mid-session:
09:18:15 desktop.updates.installDownloadedUpdate -> stopSessions
09:18:28 server.startup
09:21:30 next prompt -> session.started {resume: ...}
09:21:44 one API call: cache write 77,220, cache read 9,965The resume re-paid the whole ~95k cached prefix, 77,220 tokens, which is 96% of that session's excess. This is not the Stop path from #8997, now closed unmerged, and not the idle reaper. Any mid-session server restart forces a full prefix rewrite on the next prompt. I think this is worth fixing on its own. Don't install updates while a thread is active, and warn before restarting one. It may explain why several reports here come from nightly builds.
- T3: 0.37 to 0.50, so 13 points. This comes from Anthropic's own
@t3dotgg I think enough has been shown both in concrete evidence and in more anecdotal/subjective reports that this warrants a reopen or at least a second looking at
maybe need to create another issue?
maybe need to create another issue?
No, Theo can reopen this one, I assure you
I just tried to use T3code again using the gill me skill on a project of mine which spun up 8 subagents and my usage limit was hit within 5 minutes before any of the subagents have finished I was using Fable 5.1 and i'm on the $100 a month plan.
I really do want to use this application it's a lot better than the Claude code CLI which is where i spend most of my time. I'm not really sure how to help debug this problem sorry
2.1.260 (Claude Code) 0.0.39-nightly.20260904.1275 (T3 Code (Nightly))
I independently noticed similar usage spikes and investigated my local session logs.
We reproduced full Claude prompt-cache misses after restarting/resuming a session following Git changes, using real Opus requests. Separately, we tested T3’s idle-reaper logic and found a case where a long-running turn can become eligible for teardown immediately after completion.
This does not explain the no-restart A/B comparison reported in this issue. The cache behavior also reproduces in native Claude CLI; T3’s automatic session lifecycle may increase exposure to it.
I opened a focused report with reproduction steps, token counters, historical examples, and limitations: https://github.com/pingdotgg/t3code/issues/10600
Has this issue been resolved? I know it was closed as Theo could not see the issue, but seeing if other people have experienced this again in the last few weeks.
Happening to me. Tested the same task on both CC directly and via T3 Code and it was scary how the limit usage was more aggressive with T3 Code. No idea why though
I measured this on a real account. I'm fairly confident about what happens, but the why is a guess.
Result: for identical requests from the same Claude CLI binary on the same account, sessions driven the way T3 drives them used 2–3x more of the 5-hour limit than the interactive Claude Code CLI. T3 did not send more requests or tokens.
Method.
- Unit: each unit is a fresh session with identical input: a 200 KB file plus "reply with one word, no tools".
- Same for every arm: CLI 2.1.287, Opus 5, effort high, auto mode.
- T3-style arms:
@anthropic-ai/claude-agent-sdkwith the query options from T3'sClaudeAdapter, once as in 0.0.34 and once as in the current nightly. - Isolation: each block ran inside one command, so nothing else on the account could add usage between snapshots.
- Readings:
anthropic-ratelimit-unified-5h-utilizationand/api/oauth/usage(whole percents).
Arm Units Tokens per unit (cache read / write) 5h usage Per unit Claude Code CLI 3 27.4k / 88.1k 30% → 36% 2.0% T3 0.0.34-style (SDK 0.3.170) 3 12.4k / 87.3k 36% → 49% 4.3% Claude Code CLI, [1m]2 27.4k / 88.1k 49% → 53% 2.0% T3 0.0.34-style + post-turn getContextUsage()3 12.4k / 86.9k 54% → 65% 3.7% Current-nightly-style (SDK 0.3.276, appended system prompt, summarized thinking) 3 12.4k / 87.3k 72% → 90% 6.0% Claude Code CLI (control) 2 27.4k / 88.1k 90% → 94% 2.0% With whole-percent readings, the ratios are roughly 1.7–2.8x for the 0.0.34-style setup and 2.5–3.5x for the current-nightly-style setup. Small samples, but consistent within every block.
Ruled out (as far as I can tell):
- Extra or hidden requests. I ran the real
t3@0.0.34server, the current nightly server and the plain CLI against a local stand-in for the API. For the same scripted turn all three made the same requests: main loop, auto-mode classifier and title. The cache markers and 1h TTL were also identical. In the live runs each unit was one Haiku title request plus one Opus request for both arms. - 1M context (row 3).
- The
count_tokensburst from the old post-turngetContextUsage()(row 4).
What differs between the clients is the client identity on every request:
T3 0.0.34 current T3 nightly Claude Code CLI cc_entrypointsdk-tssdk-tscli(Claude Desktop:claude-desktop)First system prompt line "You are a Claude agent, built on Anthropic's Claude Agent SDK." "You are Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK." "You are Claude Code, Anthropic's official CLI for Claude." User-Agent (external, sdk-ts, agent-sdk/0.3.170)(external, sdk-ts, agent-sdk/0.3.276)(external, cli)My guess at the cause, not confirmed: Anthropic meters Agent SDK traffic against the 5-hour limit at a different rate than Claude Code traffic.
- For it: the 6 May 2026 change doubled "Claude Code's five-hour rate limits". An SDK app not getting that doubling would match the ~2x of the 0.0.34 setup.
- Not separated: the SDK arms also differ from the CLI in SDK version and thinking-summary settings, and I couldn't afford more runs to tell these apart.
I couldn't find any of this documented. m-ar-c reported weekly usage of 2% vs 2% with the 5-hour limit at 21% vs 11%. My weekly readings were too coarse to confirm or rule that out.
Older data point. My own A/B from 22 Aug, read right after each first prompt, showed a larger gap than today's runs. Same prompt and repo, Opus 5 high, auto mode:
Run API calls Cache read Cache write 5h usage T3 Code first turn 41 2.66M 91k 45% Claude Desktop first turn 34 2.46M 73k 10% That is near-identical tokens for about 4.5x the usage.
Takeaways for T3.
- Token counts and cache hit rates look identical between T3 and Claude Code, so checking those won't show the gap. It only shows in the quota.
- If the guess is right, T3 can't fix this alone. It would need Anthropic to confirm how Agent SDK traffic is metered. I'd appreciate it if a maintainer could raise it with them.
Investigation and write-up by Claude Opus 5.5 (
claude-opus-5-5), running in Claude Code in the Claude desktop app.If anyone else is tired of waiting for this issue to get the attention it needs, you can try my claude-tty Paseo plugin as a workaround while we wait for Theo to come around and bully Anthropic into addressing it.
It wraps the actual Claude Code CLI directly rather than integrating with the Agent SDK, bypassing this issue entirely.
Adding a measured data point to this thread. On 0.0.45 I traced extra autonomous turns caused by the harness itself — evidence filed in #16182: duplicate
thread.message-sent+thread.turn-start-requestedevents for the same follow-up 21–52s apart (second turn has no matching message row), pending messages replayed under a NEW message id after the agent process dies, and the background service resuming an active thread with no client connected.Measurements (sanitized; weighted = input + 0.1·cache_read + 2·cache_write + output):
- Per-call cost is the same as native Claude Code: 57–65K vs 59–71K weighted; cache hit 97–99%; cache preserved across the service handoff.
- The difference is turns per instruction: 47–59 API calls per substantive instruction in these sessions vs 24–43 in native Claude Code, because the run continues unattended (queue mode, no pause, no turn cap, no checkpoints).
Requests: (1) dedupe message delivery and make pending-message replay idempotent; (2) per-thread turn/token budget with auto-pause after N turns without user input; (3) a per-thread usage meter with remaining 5h/weekly limits.
Definitely find it quite unreasonable that @t3dotgg has not revisited this yet
I have been using T3 code again for like a week and it seems that this issue is gone (for me at least).
I am having the issue, new to T3 never hit limit with pure claude before on max plan but now hitting it multiple times a day.
Seems the fast mode by default
Does fast mode use more tokens or something? (Checked this and am using fable, which does not have a fast mode. Still burns things at a crazy rate)
This seems to still be the case on orchestrator V2. I'm seeing usage drain like crazy, much higher than using cc or claude desktop.
Either:
- there is a misconfiguration in the way prompts are handled internally
- Anthropic is pricing usage differently in agentsSDK. Anthropic official website state that it's using the same shared limits. We don't know if they are exactly an "eye for an eye", but I can smell fish.
This does seem to be an issue, I've been using Claude Desktop since Opus 5.5 came out and barely once have hit my 5h limits. Switched to t3code yesterday and it burnt my 5h limit in an hour twice :( and I've not changed my workflows
30. This does seem to be an issue, I've been using Claude Desktop since Opus 5.5 came out and barely once have hit my 5h limits. Switched to t3code yesterday and it burnt my 5h limit in an hour twice :( and I've not changed my workflows
Updated to the nightly 0.46 seems to have improved things.
31. > 30. This does seem to be an issue, I've been using Claude Desktop since Opus 5.5 came out and barely once have hit my 5h limits. Switched to t3code yesterday and it burnt my 5h limit in an hour twice :( and I've not changed my workflows
Updated to the nightly 0.46 seems to have improved things.
That's what I'm on now and it just burnt everything, I was sat on the usage tab watching it go down lmao. Claude desktop meanwhile I have been shocked at how little usage it was using per thread.. I'll switch back to CC and compare once my limits reset
I'm having the same issue with Opus 5.5 for a week or so now.
Correcting my earlier comment where I said this was gone. It got better, but it's not 100% yet i think.
I don't think T3 itself is wasting tokens. I compared transcripts and T3 sends about the same requests as the CLI, sometimes fewer. What feels off is the 5h limit, it drains faster when requests go through the Agent SDK, in my usage at least.
I tracked it by adding up the tokens per 5h window from the local transcripts and comparing that to the % Anthropic reports back. Across ~25 windows on T3's normal provider, 1% of the window was about 0.37M weighted tokens. This morning I tried the same idea as @sleeyax's claude-tty plugin and routed T3 through the Claude Code CLI instead. 1% was about 0.86M. Same kind of work, more requests than yesterday morning, and I'm at 30% instead of 63%.
It's one morning, so I can't prove it, but if it holds up I'd guess Anthropic counts Agent SDK usage against the limit differently than the CLI, rather than T3 doing something wrong.
@gustavohariel i'm facing same issue, when i use claude code through their official vs code extension. it consume less quota for similer tasks. I have build one agent for creative tasks ,which utilize the Agents sdk and that also consume more quota on simple tasks as well. although i don't have actual token count.
@maria-rcks Any chance this can be reopened and looked at, at least to investigate if this is actually happening
Worth reopening. I just got on T3 code for the first time yesterday. Ate my 5hr on Max 5x plan within 50 minutes or so on Opus 5.5 xHigh. Now running on claude desktop for 5 hours on same setup and no issues with usage.
Coming back to this after a week of using T3 with a private patch that drives the
claudeCLI directly instead of going through the Agent SDK. Everything else in T3 is the same.Honestly it's night and day. I've been tracking tokens from my local transcripts against the
five_hourutilization the API sends back:Agent SDK (Oct 11–13) CLI (Oct 14–19) 5h windows measured 6 13 Weighted tokens per 1% of 5h 0.31–0.54M (most ~0.33M) 0.76–0.97M Tokens to hit 100% ~30–35M ~77–94M Same account, same kind of work, same models. One CLI window this weekend was 100% Opus and still came in at 0.78M per 1%, so it's not just me using cheaper models.
I tried to find something on my side that could explain it and couldn't:
- CLI version: my first day on the CLI route used the exact version the SDK was bundling, and it was already better.
- Model mix and context size: similar on both routes.
- Request metadata: service tier, region and speed fields are identical.
- The requests themselves: I sent the same tiny prompt both ways through a logging proxy, and they're basically the same request. The main difference is the label saying it came from the Agent SDK vs the CLI.
So I really don't think this is a T3 bug. The tokens are the same; the 5h meter just seems to move faster when the traffic comes in through the Agent SDK. That's on Anthropic's side and I can't prove it from here, but at this point it's more than a feeling.
Everyone I've shown T3 to here in Brazil noticed it right away. If someone in another region could compare T3 against the plain CLI on the same account, it'd help figure out whether that's related.
Coming back to this after a week of using T3 with a private patch that drives the
claudeCLI directly instead of going through the Agent SDK. Everything else in T3 is the same.Honestly it's night and day. I've been tracking tokens from my local transcripts against the
five_hourutilization the API sends back:Agent SDK (Oct 11–13) CLI (Oct 14–19) 5h windows measured 6 13 Weighted tokens per 1% of 5h 0.31–0.54M (most ~0.33M) 0.76–0.97M Tokens to hit 100% ~30–35M ~77–94M Same account, same kind of work, same models. One CLI window this weekend was 100% Opus and still came in at 0.78M per 1%, so it's not just me using cheaper models.
I tried to find something on my side that could explain it and couldn't:
- CLI version: my first day on the CLI route used the exact version the SDK was bundling, and it was already better.
- Model mix and context size: similar on both routes.
- Request metadata: service tier, region and speed fields are identical.
- The requests themselves: I sent the same tiny prompt both ways through a logging proxy, and they're basically the same request. The main difference is the label saying it came from the Agent SDK vs the CLI.
So I really don't think this is a T3 bug. The tokens are the same; the 5h meter just seems to move faster when the traffic comes in through the Agent SDK. That's on Anthropic's side and I can't prove it from here, but at this point it's more than a feeling.
Everyone I've shown T3 to here in Brazil noticed it right away. If someone in another region could compare T3 against the plain CLI on the same account, it'd help figure out whether that's related.
I debugged this recently and I came to the same conclusion, @t3dotgg can you bully anthropic to fix this issue?
@gustavohariel were any subagents spawned in that run? If so, do you have token counts per subagent (cache writes vs. reads)?
Subagents only get a 5-minute prompt cache, versus 1 hour for the main conversation (https://code.claude.com/docs/en/prompt-caching#which-ttl-each-request-gets). That's the same in the CLI, so it would only explain a T3 gap if T3 ends up running more subagents, or subagents that sit idle for over 5 minutes between requests (e.g. waiting on long tool calls). Each new subagent also starts with a cold cache, so several in parallel can burn through usage quickly.
It's looking like this is an Anthropic (intentional?) issue which kinda sucks... https://github.com/anthropics/claude-code/issues/97074
@gustavohariel do we have any idea if your solution is against their TOS?
@t3dotgg this is stopping me from using T3code at all especially on the $20 plan
anthropics/claude-code#97074 basically confirms my earlier measurements. Several A/B tests against the plain CLI got the same result: same tokens, but the 5-hour window drains about 1.8 to 3x faster when the traffic is labelled as Agent SDK.
So the label decides how a request is counted against the 5-hour limit.
Why only some people notice. It only shows up if you actually hit the 5-hour limit, and weekly limits don't seem to show the gap (Haven't done enough testing to say for sure if the weekly limit gets counted differently). Token counts and cache hit rates look identical either way, so checking those finds nothing.
I also read Anthropic's current terms, as far as I can tell:
- Driving the real CLI, like claude-tty, looks fine: the Claude Code legal page says the restrictions don't prevent "an end user from signing in to the unmodified Claude Code binary with their own Claude subscription". claude-tty runs the normal
claudebinary with your own login, pastes your messages in, and reads Claude Code's own transcripts and hooks. It doesn't touch credentials or change the label, so requests honestly saycli. - Grey area: the Consumer Terms forbid access "through automated or non-human means, whether through a bot, script, or otherwise", unless Anthropic explicitly permits it. A wrapper pasting your own messages is technically automation, but since third-party apps are explicitly permitted, I don't think it's meant to cover this. Nothing addresses wrapping the terminal CLI specifically.
- What I'd avoid: Faking the label (for example setting
CLAUDE_CODE_ENTRYPOINT=claude-vscodein T3 to get the cheaper rate). That misrepresents the client, and the terms forbid "bypassing any of our systems or protective measures".
Since T3 can't fix the weighting on its own, the options for T3 are: get an answer from Anthropic, or offer an optional provider that drives the real CLI the way claude-tty does.
- Driving the real CLI, like claude-tty, looks fine: the Claude Code legal page says the restrictions don't prevent "an end user from signing in to the unmodified Claude Code binary with their own Claude subscription". claude-tty runs the normal
@berkaykiran My numbers already count cache writes at their real weight (5m writes 1.25x, 1h writes 2x), so cold caches and subagents would show up as more tokens, not as more % per token. Subagents actually go the other way:
Agent SDK (Oct 11–13) CLI (Oct 14–19) Subagent share of tokens 30% 53% Subagent tokens that were 5m cache writes 15% ~0% (they get 1h cache) Tokens per 1% of 5h ~0.33M ~0.8–0.9M So the CLI weeks ran more subagents and still stretched the window almost 3x further.
@JamesPeters98 I'm not sure but we should be fine i guess.
Another A/B on Max 5x, Opus 5.5 medium, same account and machine: T3 Code (
sdk-ts) used about 2.4x more of the 5-hour window than Claude Desktop (claude-desktop) and the interactive CLI (cli) for the same tokens and request count. Two rounds, Claude Code 2.1.280 and 2.1.307, same result both times. Numbers and method in anthropics/claude-code#97074: https://github.com/anthropics/claude-code/issues/97074#issuecomment-6328924327@gustavohariel How well does you claude tty fork work? Considering trying it myself. Do you lose any t3code features?
@JamesPeters98
My first patch was a port of sleeyax's claude-tty. It replaced T3's Agent SDK path with a provider that drives the real
claudeCLI. That fixed the usage gap, but it meant maintaining a second provider path inside T3.What i did doesn't replace the SDK. T3 still uses it normally (query, interrupt, resume, setModel, permission callbacks, MCP). The only change is
pathToClaudeCodeExecutable, which points at a small shim. The shim runs the real interactiveclaudein a pty and translates the SDK protocol to and from it. Anthropic sees CLI usage, and T3's provider code stays as it was.It has been stable for me since. Nothing missing so far.
T3 side: it's a private patch, not a fork. A daily job downloads the newest release, dry-runs every patch against it and checks whether upstream touched the code the patch edits. If an anchor moved, it starts an agent thread that fixes the patch and says whether the update is safe. So I only update once that passes.
point your agent at this thread and have it build the same thing.
I ran an A/B to check whether the gap comes from the
sdk-tsentrypoint label. It does not. It comes from interactive mode vs SDK mode.Script#
Setup: Claude Code 2.1.308, Agent SDK 0.3.276 (the version T3 pins), Opus 5.5 at effort medium, Team plan.
Every run sends the same prompt: a 110 KB source file plus "review it in ~1500 words". Each run has no tools, a fresh session, and a unique run id so the prompt cache cannot be reused. Runs go in blocks of 3, and the blocks of each arm alternate. Before and after each block, I read
rate_limits.five_hour.utilizationfromusage_EXPERIMENTAL_MAY_CHANGE_DO_NOT_RELY_ON_THIS_API_YET().SDK arms (run.mjs)
// node run.mjs <sdk|cli|sdk5m> <nonce> import { query } from "@anthropic-ai/claude-agent-sdk"; import { spawn } from "node:child_process"; import { readFileSync } from "node:fs"; const [arm, nonce] = process.argv.slice(2); const input = readFileSync("input.txt", "utf8"); const spawnFn = (o) => { const env = { ...o.env }; if (arm === "sdk5m") env.CLAUDE_CODE_PROMPT_CACHE_TTL = "5m"; if (arm === "cli") { env.CLAUDE_CODE_ENTRYPOINT = "cli"; delete env.CLAUDE_AGENT_SDK_VERSION; } return spawn(o.command, o.args, { cwd: o.cwd, env, stdio: ["pipe", "pipe", "inherit"], signal: o.signal }); }; let push; const msgs = { [Symbol.asyncIterator]() { return this; }, next: () => new Promise((r) => (push = r)) }; const q = query({ prompt: msgs, options: { pathToClaudeCodeExecutable: process.env.CLAUDE_BIN, spawnClaudeCodeProcess: spawnFn, model: "claude-opus-5-5", effort: "medium", maxTurns: 1, tools: [], persistSession: false, } }); push({ value: { type: "user", parent_tool_use_id: null, message: { role: "user", content: `Run id ${nonce}. Below is a TypeScript file. Write a detailed review of it, about 1500 words.\n\n${input}` } }, done: false }); for await (const m of q) if (m.type === "result") { console.log(JSON.stringify({ arm, cost: m.total_cost_usd, ...m.usage })); break; } process.exit(0);TUI arm: a Python
pty.fork()runsclaude --model claude-opus-5-5 --effort medium --tools "" --session-id <uuid>, bracket-pastes the same prompt, and waits forstop_reason: end_turnin the session transcript. Usage is read from the transcript. The transcript showsentrypoint: cli.Observation#
Arm User-AgententrypointCache TTL Context per run 5h window per block of 3 Window per run API $ per run SDK (T3 today) sdk-ts1h 49k 7, 8, 7, 8, 7 2.4% 0.56 SDK + CLAUDE_CODE_ENTRYPOINT=clicli1h 49k 7, 7 2.3% 0.56 SDK + CLAUDE_CODE_PROMPT_CACHE_TTL=5msdk-ts5m 49k 7, 7 2.3% 0.42 Interactive TUI in a pty cli5m 107k 4, 4 1.3% 0.46–0.54 I also compared my last 30 days of
~/.claude/projectstranscripts: 15 CLI sessions against 6 T3 sessions. Both have the same token mix: about 24% cache writes, 61% cache reads, and 13% output by cost. The subagent share is also the same (16% vs 17%).Conclusion#
- The entrypoint label is not the cause. Spoofing
cliin theUser-Agentchanges nothing. - Cache TTL is not the cause. A 5m TTL cut API cost by 25%, but window usage stayed the same.
- The interactive TUI uses about 45% less of the 5h window per run, while it sends 2× the context. Anthropic counts interactive-mode traffic at a lower rate based on some other signal, and that signal is not the entrypoint label. This matches @elmariodev's 2.4×. It also explains why the pty/claude-tty approach works while env tweaks do not.
- T3 does not send extra tokens. A fix inside T3's SDK usage cannot close this gap. The fix has to come from Anthropic (anthropics/claude-code#97074).
Caveats: the meter reports whole percents only, each arm has 2–5 blocks, and this is a Team plan, not Max or Pro.
- The entrypoint label is not the cause. Spoofing
One more cause to rule out, separate from the interactive vs SDK gap above (that A/B used
tools: [], so it can't show this).If
~/.claude/settings.jsonhasENABLE_TOOL_SEARCH=auto(caveman enable claudewrites it), T3 sessions get much more expensive. Claude Code's default when the variable is unset is always-on tool search. Withauto, the SDK connects MCP servers after the first call, so those calls fall under the threshold and send every MCP schema in full (T3's ownt3-codeserver is 83 tools). When the late servers connect, it flips to deferred and the prompt cache misses.In my sessions (sdk-ts 2.1.308/309, T3 0.1.1/0.1.2):
call tools sent cache write cache read 1 117 92,823 0 2 129 101,549 0 4 16 38,326 0 That's about 2.5x the CLI for the same task. Before enabling caveman, call 1 was about 13k write and 15k read.
Check:
grep ENABLE_TOOL_SEARCH ~/.claude/settings.json. Fix: set it to"true", or remove it if nothing else needs it. Reported to caveman: JuliusBrussee/caveman#1361.Note
🤖 Claude Opus 5.5 responding on behalf of Theo
We know about this, and I'm on it. I confirmed that it is a real bug on Anthropic's side, and I have contacted Anthropic about it.
For the same tokens, Anthropic's 5h meter charges Agent SDK traffic (which T3 Code uses) about 1.6x to 1.7x more than the interactive Claude Code TUI. Weekly limits are not affected. T3 Code does not send more tokens or break the cache.
Details: https://x.com/theo/status/2114166439813017873

All 5h limit reports now go in #24649. Upstream issue: anthropics/claude-code#97074.
Sweet, hope to see a fix! t3dotgg
Thanks @t3dotgg 🫡
It says closed but is this really the case? I try T3 Code since a couple of days, do exactly the same tasks as before (with e.g. Zed/Kiro Claude extensions) and reach my hourly limit so quickly that I simply cannot use T3 Code.
I have also checked #24654 but I am not sure if this landed on the latest source already.
@Poolshark try the latest nightly build. I have it installed and the fix is working really well.
It landed as https://github.com/pingdotgg/t3code/pull/28410
How exactly does that fix it? That PR doesn't seem related to me.
It changes the entrypoint ID so T3Code using Claude doesn't get tagged as Agent SDK traffic and skips it's 5h penalty.
I'm still seeing this. Usage shoots up compared to Claude Code.
I started using t3 code just 2 days ago, and yeah. Burned through my 5 hour session limit super fast, both on my 100 usd claude subscription but even more on my 20 usd gpt subscription. Got so bad I ended up searching and got to this thread.
So sad too because it's so cool :( but had to uninstall and go back to claude code native app
Same here, latest update, burned my token usage from 0 to 100% in 5 min
Yeah still the same with me. Unfortunately, T3 Code is basically unusable (but I assume this is the same with any 3rd party wrapper).
UPDATE
I have tried the latest release (including updating Claude on my machine) over the weekend and it now seems to work! I was running the exact 2 tasks with 2 different Claude subscriptions, one with T3 Code the other with Claude CLI. The usage limits drained equally fast.
Thanks T3 team! 🙌
Sign in to join this conversation.
As additional comments (which you should really add to your bug template): I made 5-6 plans with T3 Code and every time it would use up my entire 5-hour limit. Made 3 plans for the same codebase with very similar requirements/depth and only used about 10-15% each. Also observed during coding, but didn't want to report based on that alone since it might just be me perceiving things wrong.