You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Can't available Codex CLI with Team Plan subscription #1977
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
2. In the ChatGPT web UI, switch to the Team workspace (avatar → Workspaces → select Team)
3. Run codex login → choose Sign in with ChatGPT
4. 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?
Reacted by Pristor, Dmitriy Nevzorov, Patrick Bassner, David Weber, Robin | Liquidium and Utkarsh J
@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.
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.
Install the codex cli: npm i -g @openai/codex@latest
Launch codex and log in
Close codex (it likely won't work at this stage)
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)
Copy that account_id into the JSON file located in ~/.codex/auth.json, replacing the other one (don't change anything else)
Install the codex cli: npm i -g @openai/codex@latest
Launch codex and log in
Close codex (it likely won't work at this stage)
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)
Copy that account_id into the JSON file located in ~/.codex/auth.json, replacing the other one (don't change anything else)
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...
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.
I used google to signin with the same account (picked as personal)
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
I used google to signin with the same account (picked as personal)
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.
Activity
HenriNext commentedon Aug 8, 2025
The root cause is most likely that
Teamplan is detected asFreeplan.See issue #1984 and please vote or comment on that issue too for more visibility / faster fix.
MILKMILKKING commentedon Aug 8, 2025
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
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?
dnevzorov commentedon Aug 8, 2025
I'm facing the same issue
NeerajG03 commentedon Aug 8, 2025
I'm facing something similar but not the same

I logged in with my account that has team plan. Is this intended?
─❯ codex --version
codex-cli 0.19.0
yujihonjo commentedon Aug 8, 2025
Also 0.19.0
olivier-areas commentedon Aug 8, 2025
Same issue v0.19.0 on Ubuntu 24.04.2 LTS
HenriNext commentedon Aug 8, 2025
@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 commentedon Aug 8, 2025
@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 commentedon Aug 8, 2025
Excactly the same behavior. I have the team subscription but it's shown as Free.
version 0.19, fresh install on WSL.
mrairdon-midmark commentedon Aug 8, 2025
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.
mrairdon-midmark commentedon Aug 8, 2025
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)robin-liquidium commentedon Aug 8, 2025
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...samuelbirocchi commentedon Aug 8, 2025
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 commentedon Aug 8, 2025
Same here, Team plan detected as Free
6 remaining items
Motaphe commentedon Aug 8, 2025
@samuelbirocchi
structure of the auth.json file:
robin-liquidium commentedon Aug 8, 2025
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.
fforres commentedon Aug 8, 2025
Can confirm :)
Now we are able to select the organization on login
cheema-corellian commentedon Aug 9, 2025
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 commentedon Aug 16, 2025
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?
agilesrcmh commentedon Aug 21, 2025
still not working with the team account for me.
MuddySheep commentedon Aug 21, 2025
Same
ejntaylor commentedon Sep 18, 2025
I just logged in 5 times. on the 5th time I got Plan Team
👤 Account
• Signed in with ChatGPT
• Login:
• Plan: Team
Only difference was on last time I changed myself to be admin of workspace. Not sure causation or correlation.
nicu-chiciuc commentedon Oct 15, 2025
This issue is still here on codex
0.46.0danievanzyl commentedon Oct 16, 2025
This is what I found out.
walsha2 commentedon Oct 16, 2025
@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.