Codex login in Xcode doesn't work (redirect after login doesn't work, ui never logged in)

Open 💬 2 comments Opened Jul 21, 2026 by nohli
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of the IDE extension are you using?

0.140.0

What subscription do you have?

Pro

Which IDE are you using?

Xcode

What platform is your computer?

macOS

What issue are you seeing?

Not logged in

What steps can reproduce the bug?

Log in to Codex in Xcode, finish browser login and close browser window

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

2 Comments

github-actions[bot] contributor · 1 month ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #33535

Powered by Codex Action

nohli · 1 month ago

I successfully worked around the login bug with the help of ChatGPT and different attempts. Here are the steps I took:

I had this issue: ChatGPT login worked, the standalone Codex CLI worked, but Xcode stayed signed out.

What fixed it:

  1. In Xcode, choose Authenticate with configuration file.
  1. Open:
~/Library/Developer/Xcode/CodingAssistant/codex/config.toml
  1. Set:
forced_login_method = "chatgpt"
cli_auth_credentials_store = "file"
  1. Authenticate using Xcode’s bundled Codex with device auth (replace 0.140.0 with the version currently bundled with your Xcode):
CODEX_HOME="$HOME/Library/Developer/Xcode/CodingAssistant/codex" \
"$HOME/Library/Developer/Xcode/CodingAssistant/Agents/codex/0.140.0/codex" \
login --device-auth
  1. Verify:
CODEX_HOME="$HOME/Library/Developer/Xcode/CodingAssistant/codex" \
"$HOME/Library/Developer/Xcode/CodingAssistant/Agents/codex/0.140.0/codex" \
login status

It should show:

Logged in using ChatGPT
  1. Before opening Xcode again, make sure config.toml still contains:
cli_auth_credentials_store = "file"

Xcode uses its own bundled Codex binary and its own CODEX_HOME. Logging in with the global/Homebrew codex does not authenticate Xcode.