[Bug]: Claude replay fixtures lack current rate-limit and fast-mode frames, so subscription bugs close as unreproducible #49591
Before submitting#
- I searched existing issues and did not find a duplicate.
- I included enough detail to reproduce or investigate the problem.
Area#
apps/server
Steps to reproduce#
No Claude account needed. On main (ca4dd71a32):
- Pass this real
rate_limit_info(Claude Code 2.1.337, Pro account) toclaudeRateLimitEventToUpdateinapps/server/src/provider/claudeUsageLimits.ts:
It returns{"status":"allowed","resetsAt":1796346600,"rateLimitType":"five_hour","overageStatus":"rejected","overageDisabledReason":"org_level_disabled","isUsingOverage":false,"unifiedWindows":{"five_hour":{"utilization":0.21,"resetsAt":1796346600,"status":"allowed"},"seven_day":{"utilization":0.56,"resetsAt":1796587200,"status":"allowed"}}}undefined(line 172: no top-levelutilization), so live turns never update the Claude usage bars. - Search
apps/server/src/orchestration-v2/testkit/fixtures/. No Claude transcript containsunifiedWindows.fixtures/simple/claude_transcript.ndjsonwas recorded on Claude Code 2.1.111, and itsrate_limit_infois only{"status":"allowed"}. - No fixture has a fast request that Claude Code refused. This is the real init frame from a session where T3 sent
fastMode: true:
Only fixtures contain{"type":"system","subtype":"init","fast_mode_state":"off","fast_mode_disabled_reason":"extra_usage_disabled"}fast_mode_disabled_reason, so the composer keeps showing Fast.
Expected behavior#
Replay fixtures include the frames that current Claude Code sends to subscription accounts. Triage can then reproduce these bugs and verify fixes without a Claude login.
Actual behavior#
Fixes get closed because the triage VM has no Claude subscription:
- #30310 (usage windows dropped) was closed as "could not reproduce", although a commenter showed the added test reproduces it.
- #30108 (Fast silently off: #17651, #30106) was stopped with "Permanent blocker: first-party Claude OAuth usage, limit, and renewal flows are unavailable on this VM."
- #28720 (stale usage refresh) was closed for the same reason. #28869, #31135, #36533 and #49552 are still open.
For users, Claude usage limits lag by minutes, and Fast mode shows as on while every reply runs at standard speed.
Impact#
Major degradation or frequent failure
Version or commit#
T3 Code 0.1.8 (Linux). Code checked against main ca4dd71a32.
Environment#
NixOS x64, Claude Code 2.1.334 and 2.1.337, Claude Pro with usage credits off, two linked environments.
Logs or stack traces#
The payloads above come from logs/provider/events.*.log, with IDs removed. One session had fastMode: true and 31 init frames with extra_usage_disabled.
Workaround#
None.
Suggested fix#
Record two scenarios with apps/server/scripts/record-claude-agent-sdk-replay-fixture.ts on a current CLI:
usage_windows: any turn below the usage-warning threshold.fast_mode_refused:fastMode: trueon an account with usage credits off.
My account produces both. I can record them and attach the transcripts here.
Written by Claude Opus 5.5 (Claude Code) on behalf of @maxiomattic.
maxiomattic(GitHub profile, opens in a new tab) added labelsbug
maxiomattic(GitHub profile, opens in a new tab) added labelsneeds-triage
Sign in to join this conversation.
Root cause: the recorder strips usage data, so no recording can reproduce usage bugs.
sanitizeSdkMessageForReplayinapps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts(line 1203 onmain307dc643d0) rewrites everyrate_limit_eventtorate_limit_info: { status }.I checked it today:
node apps/server/scripts/record-claude-agent-sdk-replay-fixture.ts --scenario simpleon Claude Code 2.1.337 with a Pro account. The written fixture's onlyrate_limit_eventis{"status":"allowed_warning"}. The same CLI sendsrateLimitType,resetsAtandunifiedWindowsin this event (payload in the issue body). Re-recording fixtures cannot fix this.Fix: have the sanitizer keep
rateLimitType,utilization,resetsAtandunifiedWindows. These are window percentages and reset times, with no account identifiers. After that, any contributor recording can reproduce usage bugs like #30310 without a Claude login on the VM, and fixes like #49552 can be checked by replay.