Skip to content

[Bug] Team plans are excluded from Codex pool capacity #1442

Closed

Description

@terrytan95

Client or integration

OpenCodex dashboard

Area

Authentication and account pool

Summary

Valid Codex pool accounts whose WHAM quota response reports plan_type: "team" are classified as unknown by the configured-weight capacity estimator. The Providers overview therefore shows Incomplete coverage: N account(s) excluded, including N unknown plan(s) and falls back to the effective account's raw percentage instead of calculating the pool estimate.

On the affected installation, all eight healthy Codex accounts report team, so the warning excludes the entire pool even though quota data is fresh and available for every account.

Expected behavior: the legacy upstream team plan identifier should be treated as the same configured capacity tier as business, while genuinely unknown future plan names remain excluded.

Reproduction

  1. Configure OpenAI in Pool mode with one or more valid Codex accounts whose WHAM response reports plan_type: "team".
  2. Refresh provider quota data with ocx account refresh openai or open the Providers overview.
  3. Observe that each team account is counted in unknownPlanAccounts and excluded from the configured-weight aggregate.
  4. With an all-Team pool, observe the effective-account fallback percentage plus the incomplete-coverage warning instead of a pool estimate.

Sanitized account summary from the affected installation:

{
  "total": 8,
  "plans": [
    { "plan": "team", "count": 8 }
  ]
}

Current dev source (8ab41d35b3b8) reproduces the classification:

  • src/providers/codex-capacity.ts defines weights for plus, business, prolite, and pro, but not team.
  • src/codex/plan.ts normalizes case and whitespace only, so team is not aliased to business.
  • tests/provider-capacity.test.ts explicitly uses team as an unknown-plan fixture.

Version

Observed on @bitkyc08/opencodex 2.12.0; source behavior confirmed on dev commit 8ab41d35b3b8.

Operating system

macOS 27.0 (26A5406e), Apple Silicon.

Provider and model

OpenAI (Codex login), Pool mode. The defect is plan-specific and independent of the selected model.

Logs or error output

Incomplete coverage: 8 account(s) excluded, including 8 unknown plan(s)

No authentication, refresh, or routing error is present; the exclusion comes from the display-only capacity weight lookup.

Screenshots and supporting files

The Providers overview shows a valid weekly quota bar for the effective account alongside the incomplete-coverage warning. Account identities and screenshots containing local context are omitted for privacy; the sanitized plan/count output above captures the reproducing input.

Redacted configuration

{
  "providers": {
    "openai": {
      "codexAccountMode": "pool"
    }
  },
  "codexAccounts": [
    { "plan": "team" }
  ]
}

Suggested direction

Add team to the configured capacity weights with the same weight as business and update the focused capacity regressions so an all-Team pool aggregates normally. Preserve the fail-closed behavior for every other unrecognized plan string.

This remains display-only and must not change routing, pinning, affinity, pause state, or automatic switching.

Acceptance criteria

  • Fresh, routable team accounts contribute to configured-weight pool capacity with the Business-tier weight.
  • An all-Team pool reports complete aggregate coverage instead of effective-account fallback.
  • Unknown future plan strings remain excluded and counted in unknownPlanAccounts.
  • Focused capacity tests, typecheck, privacy scan, and the full test suite pass.

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

  1. added
    bugSomething isn't working
    account-poolOAuth, credentials, Codex pool, quota, failover, plans
    on Aug 11, 2026
  2. Ingwannu commented on Aug 11, 2026

    @Ingwannu
    Owner

    Confirmed on current dev: team is a valid upstream Codex plan identifier, but the display-only capacity table omits it, so a healthy Team pool is incorrectly excluded as unknown.

    #1443 is the correct minimal direction: add team at the Business-tier configured weight, retain fail-closed exclusion for genuinely unknown future plan names, and cover both mixed Team/Business and all-Team pools. I am holding integration until the exact PR head finishes required cross-platform CI; no routing, account selection, affinity, or quota mutation behavior should change.

  3. Wibias commented on Aug 11, 2026

    @Wibias
    Contributor

    Fixed by #1443

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

    account-poolOAuth, credentials, Codex pool, quota, failover, plansbugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions