Skip to content

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

Closed

Description

@fzhiy

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

Activity

  1. added
    CLIIssues related to the Codex CLI
    rate-limitsIssues related to rate limits, quotas, and token usage reporting
    on Apr 10, 2026
  2. added a commit that references this issue on Apr 11, 2026
  3. etraut-openai commented on Apr 11, 2026

    @etraut-openai
    Contributor

    Thanks for the bug report. This will be addressed in the next release.

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

    CLIIssues related to the Codex CLIbugSomething isn't workingrate-limitsIssues related to rate limits, quotas, and token usage reporting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions