Theo reports Claude Agents SDK bug that drains five-hour session limits faster
Theo reports that Claude Agents SDK usage consumes five-hour limits faster than Claude Code usage, without affecting weekly limits. He says CLIProxy's added TUI header avoids the bug while a fix is being coordinated.

TL;DR
- Agent SDK usage burns five-hour allowance faster than direct Claude Code, according to theo, who says weekly limits are unaffected.
- A controlled
claude -pcomparison found about 1.8× more quota consumption per token in the GitHub report theo shared. - CLIProxy appears to avoid the discrepancy by adding a TUI header, theo reports, while he works with Anthropic on a fix.
An experiment on a Team account produced different quota consumption with the same SDK launch, binary and prompts, changing only the client’s entrypoint identity. In a separate reproduction, an environment variable inherited through tmux even made an interactive terminal session identify itself as SDK traffic.
Five-hour subscription limits
Anthropic defines separate session limits that reset every five hours and weekly limits that reset once a week. Its Agent SDK policy says SDK calls, claude -p and third-party applications can draw from subscription allowances.
An October 7 update to that policy also introduced monthly API credits for Max and Team plans, while retaining subscription-limit access for SDK usage.
A 41-turn reproduction
GitHub user qvarker opened issue #97074 on September 25 after testing Claude Code 2.1.282 on a Max subscription, using Opus 5 at high effort.
The workload and measurement setup were:
- Fixed inputs: approximately 250,000 tokens across 18 files, followed by 41 prompts. The first prompt requested file reads; the remaining 40 asked short questions without tools.
- Two execution paths: headless
claude -p --input-format stream-jsonand the interactive TUI driven through tmux. - Normalized accounting: transcript usage deduplicated by message and request IDs, valued at API list prices, with other account activity measured and subtracted.
| Execution path | Test workload, API-equivalent value | Five-hour meter |
|---|---:|---:|
| Headless, sdk-cli | $12.74 | 52% → 60% |
| Interactive, cli | $12.91 | 60% → 65% |
Concurrent headless work contributed another $0.40 during the first phase and $1.12 during the second. After adjusting for that activity, qvarker estimated roughly 1.8× faster quota consumption headlessly.
The meter’s one-percentage-point resolution produced estimated ranges of $1.50–$1.90 of API-equivalent work per utilization point headlessly, versus $2.40–$3.90 interactively. These dollar amounts value transcript tokens at API prices.
qvarker also reported actual extra-usage charges after moving work from the TUI to headless mode, with logs showing rejected and isUsingOverage: true.
Entrypoint labels
Anthropic’s programmatic-use documentation describes the Agent SDK as exposing Claude Code’s tools, agent loop and context management through the CLI, Python and TypeScript.
The sharpest follow-up came from GitHub user kler, whose October 17 experiment held the binary, prompts and environment constant while varying entrypoint labels on a Team account.
Relative to the claude-vscode-labelled control, the results were:
sdk-ts, the TypeScript SDK’s default: 2.97× faster five-hour quota consumption.sdk-cli, the headless CLI label: 2.83× faster consumption.claude-vscode, an emulated extension identity: the reference rate.
All three arms ran through the SDK with headless streaming flags. The control emulated the VS Code extension by setting its entrypoint label; the experiment covered one account, plan and model, with a workload comprising about 96% cache reads.
The same issue includes a separate Pro-plan reproduction reporting approximately 2× faster headless consumption. Another contributor’s passive comparison against Claude Desktop found a smaller 1.3× gap across mixed workloads, with other-machine spending left unadjusted.
CLIProxy’s TUI header
qvarker found fewer tokens of every type in the headless arm during a proxy-assisted rerun, with no retries or HTTP 429/529 responses. Model, effort, thinking and context-management settings matched.
The observed request differences were:
cc_entrypoint=sdk-cliversuscliin thex-anthropic-billing-headersystem block.- The
User-Agentvalue. - The
redact-thinking-2026-02-12beta, sent only by the interactive client.
Theo suspects Anthropic increased five-hour allowances without applying the boost to SDK traffic. His subsequent update identifies CLIProxy’s added TUI header as an apparent workaround and says he is working with Anthropic on a fix.
Recent session IDs
Boris Cherny, who works on Claude Code at Anthropic, asked affected users for recent session identifiers while the team investigated. He supplied a command that searches ~/.claude/projects for UUID-named session files modified within the previous three days and outputs deduplicated IDs.
The GitHub issue remained open as of October 25.