Tracker: Codex business access-tokens broken (401 unauthorized)

Open 💬 21 comments Opened May 30, 2026 by cohereless

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

v0.135.0

What subscription do you have?

Business

What platform is your computer?

Linux

What issue are you seeing?

https://developers.openai.com/codex/enterprise/access-tokens no longer works. Fails on old versions and new versions of codex so it is likely server side.

codex exec "summarize the last release diff"
OpenAI Codex v0.135.0
--------
workdir: /workspaces/dev
model: gpt-5.5
provider: openai
approval: never
sandbox: read-only
reasoning effort: none
reasoning summaries: none
session id: redacted
--------
user
summarize the last release diff
warning: Codex could not find bubblewrap on PATH. Install bubblewrap with your OS package manager. See the sandbox prerequisites: https://developers.openai.com/codex/concepts/sandboxing#prerequisites. Codex will use the bundled bubblewrap in the meantime.
2026-05-30T08:58:22.421652Z ERROR codex_core::shell_snapshot: Shell snapshot validation failed: Snapshot command exited with status exit status: 2: /home/codespace/.codex/shell_snapshots/redacted: line 2547: syntax error near unexpected token `('

ERROR: Reconnecting... 2/5
ERROR: Reconnecting... 3/5
ERROR: Reconnecting... 4/5
ERROR: Reconnecting... 5/5
ERROR: Reconnecting... 1/5
ERROR: Reconnecting... 2/5
ERROR: Reconnecting... 3/5
ERROR: Reconnecting... 4/5
ERROR: Reconnecting... 5/5
ERROR: unexpected status 401 Unauthorized: {"detail":"Unauthorized"}, url: https://chatgpt.com/backend-api/codex/responses, cf-ray: redacted, request id: redacted
ERROR: unexpected status 401 Unauthorized: {"detail":"Unauthorized"}, url: https://chatgpt.com/backend-api/codex/responses, cf-ray: redacted, request id: redacted

What steps can reproduce the bug?

Reproduction:

  1. Generate a token in https://chatgpt.com/admin/access-tokens (only business/enterprise can do this)
  2. export CODEX_ACCESS_TOKEN='your token'
  3. curl -fsSL https://chatgpt.com/codex/install.sh | sh (only if you don't have codex yet)
  4. codex exec "Test, respond OK." (ensure you are not logged in already!)

If anyone manages to execute the above successfully, leave a comment as well.

The issue was fully reproduced in a github codespace as well, as well as on my local environment. Following the above steps should allow for a full reproduction in a github codespace, unless my account in particular is broken.

What is the expected behavior?

The codex session should respond OK, and not time out.

Additional information

_No response_

View original on GitHub ↗

21 Comments

cohereless · 1 month ago

Had a friend from a different company reproduce this on macos. Definitely a valid issue and I believe it affects all business/enterprise users. Surprised it's not tracked harder as this has started like 24 hours ago.

dbader · 1 month ago

Seems broken, getting the same 401 error with old/fresh CODEX_ACCESS_TOKEN

scubedoo187 · 1 month ago

Same issue here. getting 401 from codex backend.

nixdrey-mf · 1 month ago

Same. I perform this command to login

printenv CODEX_ACCESS_TOKEN | codex login --with-access-token

michaelgruner · 1 month ago

This started a few days back out of nowhere and is currently blocking our CI review pipeline: Ubuntu 24.04 with Codex v0.136.0. We have already tried generating new tokens and even generating a new codex seat. I have logged out, removed cache, and re-logged in several times. Same issue.

kylebrague · 1 month ago

Also reproduced on Codex CLI v0.136.0 using a Business access token.

Auth file after:

printenv CODEX_ACCESS_TOKEN | codex login --with-access-token
````

contains:

```json
{
  "auth_mode": "agentIdentity",
  "OPENAI_API_KEY": null,
  "agent_identity": "<redacted>"
}

Command:

printenv CODEX_ACCESS_TOKEN | codex login --with-access-token
CODEX_HOOKS_DISABLED=1 codex exec --json "say hello"

Observed:

Reading access token from stdin...
Successfully logged in
{"type":"thread.started","thread_id":"<redacted>"}
{"type":"turn.started"}
{"type":"error","message":"Reconnecting... 2/5 (stream disconnected before completion: failed to send websocket request: Connection closed normally)"}
{"type":"error","message":"Reconnecting... 3/5 (stream disconnected before completion: failed to send websocket request: Connection closed normally)"}
{"type":"error","message":"Reconnecting... 4/5 (stream disconnected before completion: failed to send websocket request: Connection closed normally)"}
{"type":"error","message":"Reconnecting... 5/5 (stream disconnected before completion: failed to send websocket request: Connection closed normally)"}
{"type":"error","message":"Reconnecting... 1/5 (unexpected status 401 Unauthorized: {\"detail\":\"Unauthorized\"}, url: https://chatgpt.com/backend-api/codex/responses, cf-ray: <redacted>, request id: <redacted>)"}
{"type":"error","message":"Reconnecting... 2/5 (unexpected status 401 Unauthorized: {\"detail\":\"Unauthorized\"}, url: https://chatgpt.com/backend-api/codex/responses, cf-ray: <redacted>, request id: <redacted>)"}
{"type":"error","message":"Reconnecting... 3/5 (unexpected status 401 Unauthorized: {\"detail\":\"Unauthorized\"}, url: https://chatgpt.com/backend-api/codex/responses, cf-ray: <redacted>, request id: <redacted>)"}
{"type":"error","message":"Reconnecting... 4/5 (unexpected status 401 Unauthorized: {\"detail\":\"Unauthorized\"}, url: https://chatgpt.com/backend-api/codex/responses, cf-ray: <redacted>, request id: <redacted>)"}
{"type":"error","message":"Reconnecting... 5/5 (unexpected status 401 Unauthorized: {\"detail\":\"Unauthorized\"}, url: https://chatgpt.com/backend-api/codex/responses, cf-ray: <redacted>, request id: <redacted>)"}
{"type":"error","message":"unexpected status 401 Unauthorized: {\"detail\":\"Unauthorized\"}, url: https://chatgpt.com/backend-api/codex/responses, cf-ray: <redacted>, request id: <redacted>"}
{"type":"turn.failed","error":{"message":"unexpected status 401 Unauthorized: {\"detail\":\"Unauthorized\"}, url: https://chatgpt.com/backend-api/codex/responses, cf-ray: <redacted>, request id: 146c3f5b-26ee-44cf-ae37-7f5cb4fd96e1"}}

Final request ID from this repro:

146c3f5b-26ee-44cf-ae37-7f5cb4fd96e1
meglinge · 1 month ago

<img width="775" height="194" alt="Image" src="https://github.com/user-attachments/assets/d9a5f791-f4f1-4ca5-be57-fe0d54a8b785" />

cohereless · 1 month ago

My existing access tokens seem to work again. For some reason I can't change my access tokens anymore though:

Access token creation is disabled
Enable "Allow users to create personal access tokens" in ChatGPT > Admin > Permissions & roles > Access tokens to let workspace members create access tokens.

I can't even revoke them! That setting does not show up on the dashboard.

dbader · 1 month ago

Exact same problem, on a business account and getting "Access token creation is disabled" but there's no "Permissions & roles" setting to toggle

dbader · 1 month ago

https://chatgpt.com/admin/access-tokens

<img width="1165" height="287" alt="Image" src="https://github.com/user-attachments/assets/5c19ce92-1d10-4d4e-97ab-e2ef2352bee0" />

Button goes to https://chatgpt.com/admin/permissions, but there is no "Allow users to create personal access tokens" setting, all I can see for "token" related results is a "token expiration" setting:

<img width="961" height="483" alt="Image" src="https://github.com/user-attachments/assets/a28779c4-0408-4f94-a49a-c294dcf49c62" />

MoralStrike · 1 month ago

Getting the same on a paid business account. I re-login, send couple messages in Codex - revoked again. Both seats getting revoked. When logging in, have to "confirm the phone" every time now.
OpenAI seems to hate its paying customers.

Very disappointed.
Thinking about moving to Claude.

MoralStrike · 1 month ago

Didn't get to use these accounts at all.
Yet, can't even request a refund:

So, OpenAI took my money, won't let me use Codex, and I can't even request a refund?

<img width="1316" height="949" alt="Image" src="https://github.com/user-attachments/assets/8a738bfc-102b-40d0-be3d-f6da99af3ce2" />

cohereless · 1 month ago

<img width="871" height="235" alt="Image" src="https://github.com/user-attachments/assets/a632faae-4012-448f-b9e5-b83f4f0bb451" />

The setting is now visible, but no flag to actually set it yet.

This feature rollout has arguably been insane from a professionalism perspective... Feels like an intern is in charge of it.

cohereless · 1 month ago

The setting has now become settable! 🥳 Sadly, the new tokens still don't work:

The new token does not improve things. Tested both documented paths in an isolated CODEX_HOME:

  - codex login --with-access-token fails with personal access token metadata request failed with status 403 Forbidden.
  - CODEX_ACCESS_TOKEN=... codex exec ... fails with the same 403 before any run starts.
dbader · 28 days ago

Same, I can generate new tokens (now with the at-... prefix). I can echo "<TOKEN>" | codex login --with-access-token but then any prompts inside Codex still fail with the following error:

Codex CLI v0.141.0 error:

■ stream disconnected before completion: You didn't provide an API key. You need
to provide your API key in an Authorization header using Bearer auth (i.e.
Authorization: Bearer YOUR_KEY), or as the password field (with blank username) if
you're accessing the API from your browser and are prompted for a username and
password. You can obtain an API key from
https://platform.openai.com/account/api-keys.
bjspi · 15 days ago

Business Accounts for OAUTH are broken completely, a lot of users including me are facing frequent (hourly, daily) revokation of oauth tokens without sharing any accounts across multiple machines. We just use two busines seats from the same workspace and switch the account by "rotating" the auth.json between codex-sessions... OpenAI doesnt seem to like paying customers...

michaelgruner · 15 days ago

If someone else is completely blocked by this, it seems like using the OpenAI API token (as opposed to the Codex API token) works ok. Use the --with-api-token option. It's less than ideal, but it's something...

william-best · 14 days ago

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

What subscription do you have?
Business

same issue for my team, please fix it as soon as possible.
I promoted the company to use Codex Business, but this problem occurs frequently, which has made my colleagues very disgusted. They hope to switch to Claude. This is the commercial version, why would such a basic problem occur? No commercial company should treat business customers like this.

First of all, business clients and ordinary users have different usage patterns. We will purchase multiple business accounts, but some people only use GPT (for example, non-programmers), while programmers use Codex CLI. We will use a gateway similar to codex-lb to allocate the Codex quota to programmers across the entire company, so as to balance expenses. But now there is a widespread problem of being forced to log in again, which has caused great trouble to our company's operation and maintenance.

bjspi · 6 days ago

ANY FIX PLANNED? Or does openai just ignore paying customers?

cohereless · 5 days ago

Fully works again on our business, leaving tracker open for other users as it appears that others still have some issue.

kylebrague · 4 days ago

It worked for me until 0.144.5, when it cannot load the cloud config bundle: Error: Failed to load cloud config bundle (workspace-managed policies). Reverting to 0.144.4 fixes it.

Edit: both work for me now.