Skip to content
Source
Sign inSign up
pingdotgg/t3code

[Bug]: Claude replay fixtures lack current rate-limit and fast-mode frames, so subscription bugs close as unreproducible #49591

Openmaxiomattic(GitHub profile, opens in a new tab) opened this issue 1 comment

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):

  1. Pass this real rate_limit_info (Claude Code 2.1.337, Pro account) to claudeRateLimitEventToUpdate in apps/server/src/provider/claudeUsageLimits.ts:
    {"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"}}}
    It returns undefined (line 172: no top-level utilization), so live turns never update the Claude usage bars.
  2. Search apps/server/src/orchestration-v2/testkit/fixtures/. No Claude transcript contains unifiedWindows. fixtures/simple/claude_transcript.ndjson was recorded on Claude Code 2.1.111, and its rate_limit_info is only {"status":"allowed"}.
  3. No fixture has a fast request that Claude Code refused. This is the real init frame from a session where T3 sent fastMode: true:
    {"type":"system","subtype":"init","fast_mode_state":"off","fast_mode_disabled_reason":"extra_usage_disabled"}
    Only fixtures contain 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: true on 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.

  1. maxiomattic(GitHub profile, opens in a new tab) added labelsneeds-triage

  2. Root cause: the recorder strips usage data, so no recording can reproduce usage bugs.

    sanitizeSdkMessageForReplay in apps/server/src/orchestration-v2/Adapters/ClaudeAdapterV2.testkit.ts (line 1203 on main 307dc643d0) rewrites every rate_limit_event to rate_limit_info: { status }.

    I checked it today: node apps/server/scripts/record-claude-agent-sdk-replay-fixture.ts --scenario simple on Claude Code 2.1.337 with a Pro account. The written fixture's only rate_limit_event is {"status":"allowed_warning"}. The same CLI sends rateLimitType, resetsAt and unifiedWindows in this event (payload in the issue body). Re-recording fixtures cannot fix this.

    Fix: have the sanitizer keep rateLimitType, utilization, resetsAt and unifiedWindows. 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.

    Written by Claude Opus 5.5 (Claude Code) on behalf of @maxiomattic.

Sign in to join this conversation.