openai / openai/codex

[macOS] Detached app-server repeatedly fails OAuth Keychain access with CSSMERR_CSP_NO_USER_INTERACTION

Open
#38,691 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

app-server auth bug CLI
Dominant language
Rust
Stars
125k
Forks
19.5k
PR merge metrics
PR metrics pending

Description

Codex version

0.147.0

Platform

macOS 26.6.1, Apple Silicon

Problem

Two Codex app-server processes remained alive after becoming detached from
their original interactive terminal context. Both had no TTY and were
reparented to PID 1.

During a later OAuth login attempt, the CLI reported:

failed to write OAuth tokens to keyring: Platform secure storage failure:
User interaction is not allowed.

macOS unified logs showed repeated:

CSSMERR_CSP_NO_USER_INTERACTION

The app-servers retried Keychain access approximately once per second. The
login Keychain itself was available and unlocked in the logged-in GUI session.

Neither detached server had an active client connection when inspected.
Gracefully terminating only those stale servers immediately stopped the
Keychain error loop and preserved the tmux session.

Observed conditions
  1. Start Codex app-server processes from an interactive macOS session.
  2. Allow their original owner/session to exit while the servers remain alive.
  3. The processes become detached, have no TTY, and are reparented to PID 1.
  4. Attempt an OAuth login or credential persistence operation.
  5. Keychain denies interaction and the app-servers repeatedly retry.
Expected behavior
  • App-server lifecycle should remain tied to an explicit owner or durable
    service context.
  • A noninteractive Keychain failure should produce one actionable typed error
    with bounded retry/backoff.
  • OAuth persistence requiring user interaction should be routed through the
    logged-in GUI context or deferred explicitly.
  • Detached servers without clients should not retry Keychain access every
    second.

This may be adjacent to #33540, but this report concerns detached app-server
lifecycle and noninteractive macOS Keychain access rather than refresh-token
serialization.

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 with the app-server lifecycle and OAuth login or credential-persistence path described in the report, reproducing the detached, no-TTY condition on macOS. Trace the repeated Keychain failures and determine how stale servers are handled. Done means detached servers avoid unbounded retries and noninteractive failures produce an actionable bounded response.

Written by the indexing model from the issue text.

Assessment

Tech stack
macos, rust
Domain
authentication, backend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.