Can't available Codex CLI with Team Plan subscription

Resolved 💬 31 comments Opened Aug 7, 2025 by SangkuOh Closed Aug 21, 2025

What version of Codex is running?

0.16.0

Which model were you using?

none

What platform is your computer?

Darwin 25.0.0 arm64 arm

What steps can reproduce the bug?

After logged in with my ChatGPT account(subscribe Team plan now), I can't use anything and throw this message

What is the expected behavior?

Can access any feature :)

What do you see instead?

<img width="519" height="200" alt="Image" src="https://github.com/user-attachments/assets/562cf6dc-68f9-410e-af28-5cc81faa58dc" />

Additional information

_No response_

View original on GitHub ↗

31 Comments

HenriNext · 11 months ago

The root cause is most likely that Team plan is detected as Free plan.

See issue https://github.com/openai/codex/issues/1984 and please vote or comment on that issue too for more visibility / faster fix.

MILKMILKKING · 11 months ago

Codex CLI logs in but still shows Free account, cannot use Team subscription

After installing @openai/codex and logging in, the CLI still shows my account as Free, so I cannot use features that require a subscription.

My situation:
• I have a ChatGPT Team subscription.
• The Team account was created later, while I also have an older personal ChatGPT (Free) account. Both use the same Gmail login method.
• When logging into Codex CLI, the browser may default to my older personal account (Free workspace), even though I have switched to the Team workspace in the ChatGPT web UI.
• I have tried logging out, clearing cache, switching workspaces in the web UI, and using incognito mode to reauthorize, but the CLI still doesn’t detect the Team subscription.
• There is no OPENAI_API_KEY set in my environment variables.
• The Team features work fine in the web UI.

Steps to reproduce:

  1. Install Codex CLI:

npm install -g @openai/codex
codex --version # latest version

  1. In the ChatGPT web UI, switch to the Team workspace (avatar → Workspaces → select Team)
  2. Run codex login → choose Sign in with ChatGPT
  3. After login, the CLI still shows Free account status

Expected result:
The CLI should recognize the Team subscription after login and unlock the corresponding features.

Possible cause:
• The login flow binds to the current browser session, but my browser defaults to the old account’s Free workspace.
• Codex CLI may not be handling multiple Google accounts correctly and is not picking the Team account.

Question:
Is there a way to force Codex CLI to select/target the Team workspace during login, or otherwise ensure that in multi-account scenarios it recognizes the Team subscription?

jimmyn · 11 months ago

I'm facing the same issue

NeerajG03 · 11 months ago

I'm facing something similar but not the same
I logged in with my account that has team plan. Is this intended?
<img width="993" height="185" alt="Image" src="https://github.com/user-attachments/assets/a6456615-bb8e-408d-9459-39e0ade57966" />

─❯ codex --version
codex-cli 0.19.0

yujihonjo · 11 months ago
### What version of Codex is running? 0.16.0

Also 0.19.0

olivier-areas · 11 months ago

Same issue v0.19.0 on Ubuntu 24.04.2 LTS

HenriNext · 11 months ago

@NeerajG03 it is the exactly same issue: Team plan is detected as free. You received slightly different message ("update to Plus") than in the original bug report, because the message was changed to what you see in version 0.19.0.

HenriNext · 11 months ago

@gpeal In case you are working on this: i had a quick look and it might be that login with Team plan returns two claims inside the token: the workspace / team claim, and the personal / free claim, and the auth code uses the wrong (free) claim.

SchwarzschildX · 11 months ago

Excactly the same behavior. I have the team subscription but it's shown as Free.
version 0.19, fresh install on WSL.

/status
📂 Workspace
  • Path: /mnt/e/<my project>
  • Approval Mode: on-request
  • Sandbox: workspace-write

👤 Account
  • Signed in with ChatGPT
  • Login: <my mail>
  • Plan: Free

🧠 Model
  • Name: gpt-5
  • Provider: OpenAI
  • Reasoning Effort: Medium
  • Reasoning Summaries: Auto

📊 Token Usage
  • Input: 0
  • Output: 0
  • Total: 0

user
<my prompt>


🖐 To use Codex with your ChatGPT plan, upgrade to Plus: https://openai.com/chatgpt/pricing.
mrairdon-midmark · 11 months ago

Workaround, that may help diagnose the issue for Team Plan users with both a personal free and a work team hooked to the same email.

I inspected the auth.json and saw the account_id in the json was the one associated with my personal. I replaced it with the account_id tied with my Teams (no changes to tokens), and now everything is working as expected.

Note: This is only the rust implementation running on Ubuntu-WSL, the node implementation on native Windows seems completely borked.

mrairdon-midmark · 11 months ago

Full steps that got me working, in case anyone else wants to hack it into functioning on Windows:

  1. Install Ubuntu WSL
  2. Install the ppa version of wslu so codex-cli can use a browser:
sudo add-apt-repository ppa:wslutilities/wslu
sudo apt update
sudo apt install wslu
export BROWSER=wslview
echo 'export BROWSER=wslview' > .bashrc
  1. Install the codex cli: npm i -g @openai/codex@latest
  2. Launch codex and log in
  3. Close codex (it likely won't work at this stage)
  4. Find the account_id tied to your Teams user account (F12 developer tools -> network tab -> refresh page -> search for account_id -> hunt through json responses for a guid)
  5. Copy that account_id into the JSON file located in ~/.codex/auth.json, replacing the other one (don't change anything else)
  6. Launch codex and you should have things working
robin-liquidium · 11 months ago
Full steps that got me working, in case anyone else wants to hack it into functioning on Windows: 1. Install Ubuntu WSL 2. Install the ppa version of wslu so codex-cli can use a browser: `` sudo add-apt-repository ppa:wslutilities/wslu sudo apt update sudo apt install wslu export BROWSER=wslview echo 'export BROWSER=wslview' > .bashrc ` 3. Install the codex cli: npm i -g @openai/codex@latest 4. Launch codex and log in 5. Close codex (it likely won't work at this stage) 6. Find the account_id tied to your Teams user account (F12 developer tools -> network tab -> refresh page -> search for account_id -> hunt through json responses for a guid) 7. Copy that account_id` into the JSON file located in ~/.codex/auth.json, replacing the other one (don't change anything else) 8. Launch codex and you should have things working

thanks for this! however I tried it and unfortunately it didn't work for me. I changed the account_id but it still signs in to the free personal account...

samuelbirocchi · 11 months ago

I can't even login, I get the following error on my team account:

Route Error (400 ): {
"error": {
"message": "No eligible ChatGPT workspaces found.",
"type": "invalid_request_error",
"param": null,
"code": "chatgpt_account_missing"
}
}

jimCresswell · 11 months ago

Same here, Team plan detected as Free

murilocurti · 11 months ago
I can't even login, I get the following error on my team account: Route Error (400 ): { "error": { "message": "No eligible ChatGPT workspaces found.", "type": "invalid_request_error", "param": null, "code": "chatgpt_account_missing" } }

Same here codex version 0.19.0

willenbug · 11 months ago

Some slightly updated instructions to @mrairdon-midmark

This works on Linux, Mac OS, and Windows if installed under WSL:

  1. Login to your account in Codex CLI (it won't work, but do it anyway)
  2. In any browser, navigate to chatgpt.com, login, and select your team on the bottom-left
  3. Open web dev tools (Right-click anywhere on the page, click "Inspect")
  4. Go to the "Console" tab
  5. Type "allow pasting" and press enter
  6. Copy-and-paste: javascript:alert(document.cookie.match(/(?:^|;\s*)_account=([^;]*)/)?.[1] || 'Cookie not found'); and press enter
  7. That pop-up is your account ID, use it to replace the current account id in the ~/.codex/auth.json file. Do not change anything else
samuelbirocchi · 11 months ago
Some slightly updated instructions to @mrairdon-midmark This works on Linux, Mac OS, and Windows if installed under WSL: 1. Login to your account in Codex CLI (it won't work, but do it anyway) 2. In any browser, navigate to chatgpt.com, login, and select your team on the bottom-left 3. Open web dev tools (Right-click anywhere on the page, click "Inspect") 4. Go to the "Console" tab 5. Type "allow pasting" and press enter 6. Copy-and-paste: javascript:alert(document.cookie.match(/(?:^|;\s*)_account=([^;]*)/)?.[1] || 'Cookie not found'); and press enter 7. That pop-up is your account ID, use it to replace the current account id in the ~/.codex/auth.json file. Do not change anything else

Unfortunately that doesn't work with the login error I commented before 🥲

herata · 11 months ago

@willenbug
thank you :)
It worked in Ubuntu and Mac.

samuelbirocchi · 11 months ago

Can anyone provide the structure of the auth.json file so I can try to create it myself?

Motaphe · 11 months ago

@willenbug thanks!!
It worked in Arch on codex@0.19.0

Motaphe · 11 months ago

@samuelbirocchi

structure of the auth.json file:

{
  "OPENAI_API_KEY": null,
  "tokens": {
    "id_token": "***",
    "access_token": "***",
    "refresh_token": "***",
    "account_id": "***"
  },
  "last_refresh": "2025-08-08T18:09:29.773467Z"
}
robin-liquidium · 11 months ago

It seems like they pushed a fix for this just now!

if you run codex login now, you will be asked in your browser which workspace you want to connect to.

Therefore I think this issue can be marked as resolved.

fforres · 11 months ago
It seems like they pushed a fix for this just now! if you run codex login now, you will be asked in your browser which workspace you want to connect to. Therefore I think this issue can be marked as resolved.

Can confirm :)
Now we are able to select the organization on login

<img width="465" height="616" alt="Image" src="https://github.com/user-attachments/assets/c215d2bf-67fb-4d51-bea6-adc19886ca4c" />

<br />

<img width="226" height="72" alt="Image" src="https://github.com/user-attachments/assets/cd3a7e64-96e9-460e-9fbc-7347e64d51ab" />

cheema-corellian · 11 months ago
It seems like they pushed a fix for this just now! if you run codex login now, you will be asked in your browser which workspace you want to connect to. Therefore I think this issue can be marked as resolved.

I tried the standard method. Started "codex" and tried to select the login option in TUI. That is broken for WSL users. It sits there and tries forever. When I hit escape, only then does it show a URL for login. I try that, but it is too late. That URL does not work.

Out of desperation I tried "codex login" and and that actually showed the login URL. And that finally worked. Hallelujah!

I wish they would fix the TUI also so that it doesn't just focus on pretty, but function too and actually show you the URL you need to go to.

Arminova · 11 months ago

codex will detect the correct workspace account for me but after login it says:

Only users with Plus or Pro subscriptions can redeem free API credits.
Successfully logged in

so, I want to know the workspace team account doesn't have any free api credit for codex?

agilesrcmh · 11 months ago

still not working with the team account for me.

MuddySheep · 11 months ago
still not working with the team account for me.

Same

ejntaylor · 10 months ago

I just logged in 5 times. on the 5th time I got Plan Team

👤 Account
• Signed in with ChatGPT
• Login: <email>
• Plan: Team

Only difference was on last time I changed myself to be admin of workspace. Not sure causation or correlation.

nicu-chiciuc · 9 months ago

This issue is still here on codex 0.46.0

danievanzyl · 9 months ago

This is what I found out.

  1. Our company uses okta SSO to auth for chatgpt
  2. I used google to signin with the same account (picked as personal)
  3. I ignored the social logins and type my email address and it correctly picked up our workspace and got redirected to our sso and team is now being displayed in the codex cli
walsha2 · 9 months ago
This is what I found out. 1. Our company uses okta SSO to auth for chatgpt 2. I used google to signin with the same account (picked as personal) 3. I ignored the social logins and type my email address and it correctly picked up our workspace and got redirected to our sso and team is now being displayed in the codex cli

@danievanzyl thank you! This was my exact issue as well. SSO with Google was not working, but I manually entered the email in the login screen and it worked after continuing down the login process.