Skip to content

Constant requests to https://chatgpt.com/backend-api/wham/usage even in API mode #10869

Closed

Description

@iwinux

What version of Codex CLI is running?

codex-cli 0.98.0

What subscription do you have?

ChatGPT Plus & internal API provider

Which model were you using?

gpt-5.2-codex

What platform is your computer?

Darwin 24.3.0 arm64 arm

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

Ghostty

What issue are you seeing?

When switching a Codex CLI session from ChatGPT auth to an API profile (custom endpoint), the CLI still issues periodic (every ~60s) GET https://chatgpt.com/backend-api/wham/usage requests using the auth.json access token. This happens even though prompts are correctly routed to the custom endpoint for the active profile.

What steps can reproduce the bug?

  1. Ensure valid ChatGPT auth.json exists (ChatGPT auth mode).
  2. Start Codex CLI and switch to a profile configured for API mode (custom endpoint).
  3. Send prompts (they go to the custom endpoint as expected).
  4. Observe network traffic.

What is the expected behavior?

Once the active profile is API mode (custom endpoint), no background requests should be sent to chatgpt.com/backend-api/wham/usage, and the ChatGPT access token should not be used.

Additional information

Below is the analysis by Codex itself 😉


The TUI rate-limit poller appears to start whenever cached ChatGPT auth exists, regardless of the active model provider or profile. It seems tied to ChatWidget::prefetch_rate_limits and does not check whether the current profile/provider requires OpenAI/ChatGPT auth.

Relevant code:

  • tui/src/chatwidget.rs
    ChatWidget::prefetch_rate_limits -> spawns a 60s interval poller that calls fetch_rate_limits -> backend-client/src/client.rs::get_rate_limits -> /wham/usage for ChatGPT base URL.

Suggested fix: guard the poller so it only runs when the active model provider requires OpenAI auth (or when the active profile is ChatGPT-auth). If the profile is API mode, skip the poller even if ChatGPT auth is present on disk.

Activity

  1. added
    bug
    on Feb 6, 2026
  2. added
    CLI
    rate-limits
    TUI
    on Feb 6, 2026
  3. removed
    TUI
    on Feb 7, 2026
  4. added a commit that references this issue on Feb 7, 2026
    cacd220
  5. added a commit that references this issue on Feb 7, 2026
    3779b52
  6. added a commit that references this issue on Jun 27, 2026
    e310d1f
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

    CLIbugrate-limits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions