codex-cli fails to decode rate-limit response when plan_type is "prolite"

Resolved 💬 1 comment Opened Apr 10, 2026 by fzhiy Closed Apr 11, 2026

What version of Codex CLI is running?

codex-cli 0.118.0

What subscription do you have?

Unknown; backend returns plan_type=prolite

Which model were you using?

Not model-specific

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

What terminal emulator and version are you using (if applicable)?

tmux on WSL2 (Ubuntu 24.04)

What issue are you seeing?

Codex CLI fails while fetching rate limits from:

https://chatgpt.com/backend-api/wham/usage

The response includes:

{
"plan_type": "prolite"
}

and Codex errors with:

failed to fetch codex rate limits: Decode error for https://chatgpt.com/backend-api/wham/usage: unknown variant prolite, expected one of guest, free, go, plus, pro, free_workspace, team, self_serve_business_usage_based, business, enterprise_cbp_usage_based, education, quorum, k12, enterprise, edu

What steps can reproduce the bug?

  1. Log in with an account whose /backend-api/wham/usage response returns "plan_type": "prolite".
  2. Trigger Codex rate-limit fetching.
  3. In my case this reproduces via:

codexbar --provider codex --source cli

The underlying failure appears to come from codex CLI itself, not CodexBar.

What is the expected behavior?

Unknown plan_type values should not fail rate-limit fetching. They should deserialize safely and fall back to an unknown plan type.

Additional information

This looks like a closed-enum deserialization issue in the rate-limit payload path.

A safe fix would be to accept unknown plan_type values and map them to Unknown instead of failing the whole request.

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗