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_
31 Comments
The root cause is most likely that
Teamplan is detected asFreeplan.See issue https://github.com/openai/codex/issues/1984 and please vote or comment on that issue too for more visibility / faster fix.
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:
npm install -g @openai/codex
codex --version # latest version
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?
I'm facing the same issue
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
Also 0.19.0
Same issue v0.19.0 on Ubuntu 24.04.2 LTS
@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.
@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.
Excactly the same behavior. I have the team subscription but it's shown as Free.
version 0.19, fresh install on WSL.
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_idin the json was the one associated with my personal. I replaced it with theaccount_idtied 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.
Full steps that got me working, in case anyone else wants to hack it into functioning on Windows:
npm i -g @openai/codex@latestcodexand log inaccount_id-> hunt through json responses for a guid)account_idinto the JSON file located in ~/.codex/auth.json, replacing the other one (don't change anything else)thanks for this! however I tried it and unfortunately it didn't work for me. I changed the
account_idbut it still signs in to the free personal account...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, Team plan detected as Free
Same here codex version 0.19.0
Some slightly updated instructions to @mrairdon-midmark
This works on Linux, Mac OS, and Windows if installed under WSL:
javascript:alert(document.cookie.match(/(?:^|;\s*)_account=([^;]*)/)?.[1] || 'Cookie not found');and press enter~/.codex/auth.jsonfile. Do not change anything elseUnfortunately that doesn't work with the login error I commented before 🥲
@willenbug
thank you :)
It worked in Ubuntu and Mac.
Can anyone provide the structure of the auth.json file so I can try to create it myself?
@willenbug thanks!!
It worked in Arch on codex@0.19.0
@samuelbirocchi
structure of the auth.json file:
It seems like they pushed a fix for this just now!
if you run
codex loginnow, 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" />
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.
codex will detect the correct workspace account for me but after login it says:
so, I want to know the workspace team account doesn't have any free api credit for codex?
still not working with the team account for me.
Same
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.
This issue is still here on codex
0.46.0This is what I found out.
@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.