[Bug] SDK entrypoint charged 5-6x higher rate than CLI for identical work

Status Open
Reported on v2.1.220
Maintainer reply None cached
Activity 0 comments · opened Jul 31, 2026

Bug Description
Title: Same work costs ~5x more 5-hour quota when entrypoint is sdk-cli/sdk-ts than cli

Environment: Claude Code 2.1.220, Windows 11. Account tienlocbui1110@gmail.com, organizationType: claude_max, organizationRateLimitTier: default_claude_max_5x, userRateLimitTier: null, hasExtraUsageEnabled: true. All runs on one machine, one login (~/.claude), cwd E:\Haruwari, on 2026-07-31 UTC.

Summary: I ran the same prompt on the same MR with the same model and effort, both interactively and via claude -p. Interactive consumed ~1% of the 5-hour window for 2.4–3.5M tokens; claude -p consumed 3% for 1.2M tokens. Normalised, that is ~0.3 %/1M vs ~2.5 %/1M — a ~6x difference for identical work, with a hard floor of 3.3x after integer-percent rounding. Opus 5 run interactively is metered at roughly the same rate as Sonnet 5 run via the SDK.

Measurements (token counts from ~/.claude/projects/E--Haruwari/<id>.jsonl, deduplicated by message.id; subagent transcripts included where present):

┌─────────────────────────────────┬───────────┬──────────┬─────────┬──────┬───────┬─────────┬────────┬─────────┬─────────────┬──────────┐
│ Session ID │ UTC │ entrypoi │ Model / │ Turn │ Outpu │ Cache │ Cache │ Total │ 5h bar │ %/1M │
│ │ │ nt │ effort │ s │ t │ read │ write │ tokens │ │ │
├─────────────────────────────────┼───────────┼──────────┼─────────┼──────┼───────┼─────────┼────────┼─────────┼─────────────┼──────────┤
│ fd7550e0-c524-4ad9-9745-c78f105 │ 11:16–11: │ │ sonnet- │ 45+3 │ 18,87 │ 5,053,6 │ 186,90 │ 5,259,6 │ ~2% │ │
│ 6e281 + 26323d88-66ec-4306-9821 │ 27 │ sdk-ts │ 5 / │ 3 │ 3 │ 87 │ 8 │ 21 │ (approx.) │ 0.38 │
│ -457160d8b712 │ │ │ medium │ │ │ │ │ │ │ │
├─────────────────────────────────┼───────────┼──────────┼─────────┼──────┼───────┼─────────┼────────┼─────────┼───────────…
Note: Content was truncated.

View original on GitHub ↗