Claude usage limits can display another account's weekly quota

Đang mở
#39,770 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
authentication, backend

Hướng nghiên cứu

Start by tracing resolveUsageLimitsAfterProbe and the Claude provider usage probe and cache code named in the report. Check how authenticated account identity is obtained, how snapshots are keyed and invalidated, and how probe failures are propagated. Reproduce the mismatched-account and unavailable-response cases from the issue; done means another account's cached quota is never shown as B's fresh usage and failures remain sanitized.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Environment

  • macOS (Apple silicon)
  • T3 Code Nightly 0.1.11-nightly.20261118.4864
  • Claude Code 2.1.328
  • Two or more claudeAgent provider instances using separate Claude Code configurations and macOS Keychain namespaces. Both accounts use Claude subscription OAuth.

Reproduction

  1. Set up two Claude provider instances, A and B, with distinct OAuth accounts and separate Keychain namespaces.
  2. In a disposable configuration for B, retain locally cached account metadata from A. Seed a fresh weekly usage cache whose account key also refers to A. Set the cached weekly utilization to a recognizable synthetic value, such as 37.25%.
  3. Launch a Claude Code Agent SDK probe with B's Keychain namespace and the disposable configuration. Disable tools and hooks, use an empty MCP configuration, and disable session persistence. Send initialize, then get_usage with skip_behaviors: true. No model prompt is needed.
  4. Observe the weekly result. As a control, change only the cache's account key to an unrelated value and rerun the probe.
  5. Separately, after T3 has published a weekly result for B, make the next usage probe return no limits with rate_limits_available: true and rate_limits: null, then refresh the provider. This simulates an unavailable usage response. A transient HTTP 429 was also observed during the real incident.

Expected behavior

The usage row for B should show only data associated with B's active OAuth identity. An identity mismatch or an unavailable usage response should produce a clear, sanitized error. A prior sample may be shown as stale only if it is verified to belong to the same active account. It should never appear as a fresh sample for a different account.

Actual behavior

With matching local account metadata and cache keys, get_usage returned the seeded 37.25% from A even though the Keychain credential belonged to B. The same value disappeared when only the cache key was changed. On the live T3 system, B showed A's weekly utilization and reset time. On a subsequent failed probe, T3's resolveUsageLimitsAfterProbe retained the previously published result, so the earlier attribution persisted.

The observed Claude Code cache lookup compared the cache key with local account metadata. The active OAuth credential was verified independently. The process that originally wrote the crossed metadata was not identified. No account identifiers, credential values, or local paths are included in this report.

Suggested changes

  • T3 Code: bind usage snapshots to an authenticated account identity as well as the provider instance, and invalidate unattributed snapshots. Preserve typed, sanitized failure reasons when refreshing.
  • Claude Code: bind cache reads and writes to the active OAuth account and organization. Treat disagreement between local metadata and the active identity as a cache miss.
Ngôn ngữ chính
TypeScript
Star
24.8k
Fork
6.4k
Merge trung bình
4 giờ 29 phút
Pull request đã merge (30 ngày)
488

Chuẩn bị môi trường

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của pingdotgg/t3code

Tất cả issue của pingdotgg/t3code

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.