Repository navigation
Claude 5h limit drains about 1.7x faster in T3 Code than in the Claude Code CLI (Anthropic Agent SDK metering) #24649
Description
Note
🤖 Claude Opus 5.5 writing on behalf of Theo
This is the single tracking issue for reports that Claude's 5-hour limit drains faster in T3 Code than in Claude Code directly. It replaces #7338 and #7565.
Summary
- The bug is real, and it is on Anthropic's side. For the same tokens, Anthropic's 5h meter charges Agent SDK and
claude -ptraffic about 1.6x to 1.7x more than the interactive Claude Code TUI. - T3 Code runs Claude through the Agent SDK, so all Claude usage in T3 Code gets the higher rate. Other apps built on the Agent SDK get the same rate.
- Weekly limits are not affected. Weekly burn was the same in every run.
- T3 Code does not send more tokens or break the prompt cache.
- I reported this to Anthropic. Upstream issue: [BUG] Headless
claude -p(entrypointsdk-cli) uses ~1.8× more of the 5-hour window per token than interactivecli, same workload anthropics/claude-code#97074.
Tweet: https://x.com/theo/status/2114166439813017873
Numbers
One Max account. Nothing else used it during the test, and it started at 0% (5h) and 0% (weekly). The workload was the same for each run. "5h cost" is % of the 5h window per million cache-write tokens.
| Run (in order) | 5h meter | 5h cost | Weekly |
|---|---|---|---|
| Interactive TUI #1 | +7% | 1.14 | +2% |
| T3 Code #1 | +13% | 1.94 | +2% |
claude -p |
+9% | 1.83 | +2% |
| T3 Code #2 | +16% | 1.97 | +2% |
| Interactive TUI #2 | +7% | 1.11 | +2% |
The two T3 Code runs also include 23M to 28M cache reads. After we remove those, T3 Code still costs about 1.6x the TUI. The order was reversed for the second set of runs, and the result did not change.
Because the weekly meter is not affected, users fill the 5h window with about 14% of their weekly limit used in T3 Code, versus about 29% in the CLI.
What we ruled out
- Cache TTL. T3 Code gets the 1h prompt cache for signed-in users. We checked this in the transcripts.
- Cache breaks. Neither arm rewrote the cache. This includes 8-minute gaps, and a 35-minute gap where T3 Code closed the Claude process and resumed it.
- Token volume. The first request from T3 Code is smaller than the TUI's (34.6k prefix tokens vs 47.0k).
- Permission mode. The TUI in bypass mode costs the normal TUI rate.
Upstream
- [BUG] Headless
claude -p(entrypointsdk-cli) uses ~1.8× more of the 5-hour window per token than interactivecli, same workload anthropics/claude-code#97074:sdk-cliandsdk-tsuse about 1.8x to 2.9x more of the 5h window per token than the interactive CLI. Many people reproduced it there, including with T3 Code. - Session limit blocks the Agent SDK while the desktop app on the same account is at 62% anthropics/claude-code#104738: the session limit blocks the Agent SDK while the desktop app on the same account is at 62%.
I will update this issue when Anthropic responds. The T3 Code cache issue after Stop is separate and is tracked in #10955.

Activity
feat(launch): add opt-in entrypoint relabeling via CPROXY_ENTRYPOINT (#…
feat(t3): label T3's Claude sessions as t3-code
0oAstro commentedon Oct 29, 2026
Note
Claude Opus 5.5 writing on behalf of Shaurya.
Another reproduction, on a Team (standard seat) plan, plus a check of the relabel from #25597.
Setup. Linux arm64, Claude Code 2.1.311,
claude-opus-5-5at effort high. A Team seat that nothing else used during the test. The prompt was the same each run: one reasoning question, no tools, about 3.5k output tokens and a 27k-token prefix. I readfive_hour.utilizationfrom/api/oauth/usagebefore and after each block of runs, after waiting for it to settle. "Weighted" is the transcript usage at list-price ratios: input 1, 5m cache write 1.25, 1h cache write 2, cache read 0.1, output 5. Every arm used the same binary and model. I checked theentrypointin every transcript.clisend-keyst3-code--include-partial-messages, summarized thinking),CLAUDE_CODE_ENTRYPOINT=t3-codesdk-tsCLAUDE_CODE_ENTRYPOINT=sdk-tssdk-tsuses about 2.3x more of the 5h window per token thancli. The meter moves in 1% steps, so thecliandt3-coderows are only ±1%, and the ratio could be anywhere from about 1.5x to 3x. Thesdk-tsrate is the most precise, because it is spread over 20 points.t3-codelabel, the cost drops to theclirate, within the 1% resolution.sdk-ts(9 runs each).Pitfall for anyone measuring this from inside T3 Code. Every process started from a T3 thread inherits
CLAUDE_CODE_ENTRYPOINT=sdk-ts, includingclaudestarted inside tmux. My first A/B ran this way and showed no difference between arms, because every arm wassdk-ts. Remove theCLAUDE*andT3*variables from the environment, then checkentrypointin the transcripts.Applying the relabel without patching T3 Code. The Agent SDK only sets
sdk-tswhenCLAUDE_CODE_ENTRYPOINTis unset, and T3 Code passes its own environment to Claude. So a systemd drop-in on the T3 Code service is enough:After
systemctl --user daemon-reloadand a restart of T3 Code, new T3 Code sessions record"entrypoint":"t3-code". The concern raised in anthropics/claude-code#97074 still applies: this changes the label rather than fixing the metering.