Repository navigation
[Bug] Team plans are excluded from Codex pool capacity #1442
Description
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
- Configure OpenAI in Pool mode with one or more valid Codex accounts whose WHAM response reports
plan_type: "team". - Refresh provider quota data with
ocx account refresh openaior open the Providers overview. - Observe that each
teamaccount is counted inunknownPlanAccountsand excluded from the configured-weight aggregate. - 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.tsdefines weights forplus,business,prolite, andpro, but notteam.src/codex/plan.tsnormalizes case and whitespace only, soteamis not aliased tobusiness.tests/provider-capacity.test.tsexplicitly usesteamas 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
teamaccounts 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
Ingwannu commentedon Aug 11, 2026
Confirmed on current
dev:teamis 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
teamat 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.Wibias commentedon Aug 11, 2026
Fixed by #1443