Skip to content

Can't available Codex CLI with Team Plan subscription #1977

Closed

Description

@SangkuOh

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?

Image

Additional information

No response

Activity

  1. added
    bug
    on Aug 7, 2025
  2. HenriNext commented on Aug 8, 2025

    @HenriNext

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

    See issue #1984 and please vote or comment on that issue too for more visibility / faster fix.

  3. MILKMILKKING commented on Aug 8, 2025

    @MILKMILKKING

    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?

  4. dnevzorov commented on Aug 8, 2025

    @dnevzorov

    I'm facing the same issue

  5. NeerajG03 commented on Aug 8, 2025

    @NeerajG03

    I'm facing something similar but not the same
    I logged in with my account that has team plan. Is this intended?
    Image

    ─❯ codex --version
    codex-cli 0.19.0

  6. yujihonjo commented on Aug 8, 2025

    @yujihonjo

    What version of Codex is running?

    0.16.0

    Also 0.19.0

  7. olivier-areas commented on Aug 8, 2025

    @olivier-areas

    Same issue v0.19.0 on Ubuntu 24.04.2 LTS

  8. HenriNext commented on Aug 8, 2025

    @HenriNext

    @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.

  9. HenriNext commented on Aug 8, 2025

    @HenriNext

    @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.

  10. SchwarzschildX commented on Aug 8, 2025

    @SchwarzschildX

    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.
    
  11. mrairdon-midmark commented on Aug 8, 2025

    @mrairdon-midmark

    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.

  12. mrairdon-midmark commented on Aug 8, 2025

    @mrairdon-midmark

    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
  13. robin-liquidium commented on Aug 8, 2025

    @robin-liquidium

    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

    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...

  14. samuelbirocchi commented on Aug 8, 2025

    @samuelbirocchi

    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"
    }
    }

  15. jimCresswell commented on Aug 8, 2025

    @jimCresswell

    Same here, Team plan detected as Free

  16. 6 remaining items

  17. Motaphe commented on Aug 8, 2025

    @Motaphe

    @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"
    }
    
  18. robin-liquidium commented on Aug 8, 2025

    @robin-liquidium

    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.

  19. fforres commented on Aug 8, 2025

    @fforres

    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

    Image
    Image
  20. cheema-corellian commented on Aug 9, 2025

    @cheema-corellian

    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.

  21. Arminova commented on Aug 16, 2025

    @Arminova

    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?

  22. agilesrcmh commented on Aug 21, 2025

    @agilesrcmh

    still not working with the team account for me.

  23. MuddySheep commented on Aug 21, 2025

    @MuddySheep

    still not working with the team account for me.

    Same

  24. ejntaylor commented on Sep 18, 2025

    @ejntaylor

    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.

  25. nicu-chiciuc commented on Oct 15, 2025

    @nicu-chiciuc

    This issue is still here on codex 0.46.0

  26. danievanzyl commented on Oct 16, 2025

    @danievanzyl

    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
  27. walsha2 commented on Oct 16, 2025

    @walsha2

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions