Skip to content

Cannot sign in with BYO api key #12934

@smileBeda

Description

@smileBeda

What version of Codex CLI is running?

codex-cli 0.105.0

What subscription do you have?

PRO

Which model were you using?

gpt-5.3-codex xhigh

What platform is your computer?

Darwin 25.3.0 arm64 arm

What terminal emulator and version are you using (if applicable)?

Terminal

What issue are you seeing?

I want to sign in with my own API key.
When I do so I am offered to input my api key I do that and the prompt window opens but when I send prompt then:

■ {
  "error": {
    "message": "The encrypted content gAAA...0A== could not be verified. Reason: Encrypted content organization_id did not match the target organization.",
    "type": "invalid_request_error",
    "param": null,
    "code": "invalid_encrypted_content"
  }
}

The most crazy.. this is what it used for that failure:
Token usage: total=235,912 input=201,455 (+ 1,319,424 cached) output=34,457 (reasoning 26,892)

Further - even if the footer says I am on 5.3 codex (it was a resumed session), the model is not actually available from /model selector.

What steps can reproduce the bug?

  • codex
  • option 3 "add your own api key"
  • insert api key
  • hit enter
  • send prompt

What is the expected behavior?

No error and working codex

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLIIssues related to the Codex CLIauthIssues related to authentication and accountsbugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions