Skip to content

bug: /usage-limits counts the same subscription more than once #10701

Description

@stephenjason89

Summary

/usage-limits can count one subscription more than once when multiple native provider instances are authenticated with the same provider account. The banner then reports the number of provider records as if they were distinct subscription accounts and renders identical quota windows twice.

A real example showed 3 accounts for Codex even though the connected CLIProxyAPI hub contained only two Codex auth files. The first and third rows had the same plan, weekly percentage, reset time, and reset credit because they represented the same subscription through duplicate native instances.

Image

Reproduction

  1. Configure two native Codex provider instances that resolve to the same authenticated email, such as a default instance and a proxy-backed instance.
  2. Optionally connect a CLIProxyAPI usage hub containing that account.
  3. Run /usage-limits in a Codex thread.
  4. Observe that the account count includes both native instances and the same limits appear twice.

Expected

Count a subscription once when its provider and normalized email match. Keep instances without an email separate because T3 cannot prove they are the same account.

Cause

collectProviderUsageLimits deduplicates CLIProxy accounts against native accounts with the existing provider-and-email identity key, but it appends every native provider instance without applying that same identity rule.

Scope note

Claude accounts not appearing in this banner is expected when the command runs in a Codex thread. /usage-limits is scoped to the current thread provider. This issue covers only the incorrect duplicate count and duplicate rows.

Proposed fix: #10700

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedfeature request acceptedbugSomething is broken or behaving incorrectly.via-triageFiled through npx t3 triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions