Skip to content

Codex Desktop and CLI returning 401 Unauthorized on /backend-api/codex/responses while browser Codex works #13838

@Ace0110-M

Description

@Ace0110-M

What version of the Codex App are you using (From “About Codex” dialog)?

Codex Desktop 26.305.950 (863) 、Codex CLI v0.110.0

What subscription do you have?

ChatGPT Plus

What platform is your computer?

macOS (Apple Silicon)

What issue are you seeing?

Codex Desktop and Codex CLI consistently return:

unexpected status 401 Unauthorized
{"detail":"Unauthorized"}
url: https://chatgpt.com/backend-api/codex/responses

This happens when submitting a prompt or when running codex whoami.

Browser-based Codex works normally with the same ChatGPT account.

The issue reproduces across multiple networks and after reinstalling Codex Desktop and CLI.

What steps can reproduce the bug?

  1. Launch Codex Desktop or run codex in CLI
  2. Wait for the interface to load
  3. Submit any prompt (for example: "test")
  4. The request immediately fails with:

unexpected status 401 Unauthorized
https://chatgpt.com/backend-api/codex/responses

Additional detail:
The error does not occur at startup.
Codex launches normally, but the 401 error appears immediately after submitting a prompt.

The same behavior occurs with:

codex whoami

What is the expected behavior?

Codex Desktop and Codex CLI should authenticate successfully with the ChatGPT account and process prompts normally, the same way Codex works in the browser.

Additional information

Environment:
macOS
Codex Desktop version: 26.305.950 (863)

Subscription:
ChatGPT Plus

OpenAI Support confirmed that the account is fully entitled to both Codex App and Codex CLI.

The issue occurs:

• in Codex Desktop
• in Codex CLI
• with codex whoami

but NOT in browser-based Codex.

Recent request IDs:

request_id: d285496c-ed1b-4905-98fc-c089e37a0d2c
cf-ray: 9d830132be1681ce-SIN

request_id: a515f629-6505-49f7-a8cc-b690e705e7f9
cf-ray: 9d83021a3d5812b0-SIN

request_id: fca35f7-1aab-4671-a1bd-a96b997063fa
cf-ray: 9d87dff7db8fd80-SIN

request_id: d4309b0d-9b00-462d-a7a7-6ed9990ea89a
cf-ray: 9d87d3da3c433e65-SIN

Troubleshooting already attempted:

• reinstall Codex Desktop
• reinstall Codex CLI
• logout/login
• multiple networks
• clearing ~/.codex

The issue persists.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIappIssues related to the Codex desktop appauthIssues related to authentication and accountsbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions