openai / openai/codex

macOS Codex app loses authentication after first prompt when Advanced Security and a passkey are enabled

Open
#39,716 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

app auth bug
Dominant language
Rust
Stars
125k
Forks
19.4k
PR merge metrics
PR metrics pending

Description

What version of the Codex App are you using (From “About Codex” dialog)?

26.818.21641 Bundled app-server: 0.148.0-alpha.21

What subscription do you have?

Pro — personal account

What platform is your computer?

Darwin 25.6.0 arm64 arm

What issue are you seeing?

The Codex macOS desktop app loses my ChatGPT authentication immediately after I send the first prompt in a conversation.

This happens when Advanced Security is enabled on my personal ChatGPT account, which has a passkey configured. I can sign in and open the app normally, but after sending a simple prompt such as test, the request fails and the app returns to the signed-out state.

The desktop log shows the account initially being authenticated successfully, followed by an authentication failure approximately five seconds later:

account lookup succeeded: authenticatedAccountPresent=true, authMethod=chatgpt
desktop_fetch_auth_401: hadToken=true
auth status: hasToken=false, nullReason=auth_token_missing, tokenExpiryState=missing
account lookup failed: authenticatedAccountPresent=false, failureType=account_info_token_unavailable
Missing valid access token

The same account works normally on chatgpt.com and in the Codex CLI. Disabling Advanced Security immediately stops the desktop app from logging out. Re-enabling it causes the issue to return.
This prevents me from keeping Advanced Security enabled while using the desktop app and protected features/models that require it.

What steps can reproduce the bug?
  1. Use a personal ChatGPT Pro account.
  2. Add a passkey to the account.
  3. Enable Advanced Security.
  4. Sign in to the Codex macOS desktop app using the ChatGPT account.
  5. Start a new conversation.
  6. Send a simple prompt such as test.
  7. Observe that authentication is lost and the app returns to the signed-out state.

The problem reproduced consistently every time while Advanced Security was enabled.

What is the expected behavior?

The prompt should be sent successfully, and the desktop app should preserve the authenticated session when Advanced Security and a passkey are enabled.

The authentication behavior should be consistent with chatgpt.com and the Codex CLI, where the same account works normally.

Additional information

Approximate reproduction time from the attached log:
2026-08-20 12:46:55 UTC

Troubleshooting already attempted:

  1. Reinstalled the desktop application.
  2. Cleared or renamed the application’s local cache and state directories.
  3. Reset local authentication and Keychain-related application data.
  4. Signed in again.
  5. Confirmed that chatgpt.com works under the same account.
  6. Confirmed that the Codex CLI works under the same account.
  7. Confirmed that disabling Advanced Security fixes the desktop application.
  8. Confirmed that enabling Advanced Security causes the problem to return.

The account settings interface currently does not allow me to remove the configured passkey, so I could not test Advanced Security without the passkey.

The attached desktop log contains the complete authentication sequence. Sensitive account identifiers and local filesystem usernames should be redacted before publishing it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the sign-in, first-prompt, and sign-out sequence on the macOS desktop app with Advanced Security and a passkey enabled, then inspect the attached desktop log around the account lookup and desktop_fetch_auth_401 entries. Done means the first prompt succeeds and the authenticated session remains available under these settings, as it does in chatgpt.com and the Codex CLI.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos
Domain
authentication, desktop, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.