[macOS][MCP OAuth] Keyring write fails with Platform secure storage failure: UNIX[Operation not permitted]
What version of the Codex App are you using (From “About Codex” dialog)?
Codex app 26.820.60940 (bundle build 7119). The bundled Codex CLI reports 0.150.0-alpha.8.
A separate PATH-installed CLI on the same host reports 0.139.0. The earlier sanitized failure receipt did not retain which binary emitted the error, so this report does not claim a more precise failing-binary identity.
What subscription do you have?
Not inspected.
What platform is your computer?
macOS 26.5.2 (build 25F84), Apple Silicon (arm64).
What issue are you seeing?
During a supported MCP OAuth login flow, Codex failed while trying to persist OAuth material to secure storage:
failed to write OAuth tokens to keyring: Platform secure storage failure: UNIX[Operation not permitted]
The login did not produce a usable authenticated connector. No token or other OAuth secret is included in this report.
The host config has no explicit mcp_oauth_credentials_store override, so the documented auto setting applies. The official config reference lists only auto | file | keyring. File-based credential storage is not an acceptable secure fallback for this environment.
What steps can reproduce the bug?
The exact prior sequence was preserved without secrets:
- On the macOS Codex host, configure an existing streamable-HTTP MCP server that uses OAuth.
- Start the supported Codex MCP login flow.
- Verify the intended authorization endpoint and the local callback setup.
- Allow Codex to continue until it tries to persist the OAuth material.
- Observe the keyring write failure above.
- Confirm that the connector is not usable after the failure.
The failed workflow used Codex's supported MCP login path. No manual Keychain access, credential-store inspection, raw token, alternate profile, or custom persistence helper was used.
What is the expected behavior?
Codex should persist MCP OAuth credentials in the macOS Keychain when mcp_oauth_credentials_store = "auto" selects secure storage. If secure persistence is unavailable, Codex should return an actionable typed error and a supported secure recovery path without consuming another OAuth attempt.
Additional information
- The app bundle identifier is
com.openai.codex. - The installed bundled Codex binary SHA-256 is
4ff5e75f028e913cfeb53bd7319f87573cdce6538c1b1ccc44ce62d5ce51ca1d. - The app and bundled binary were installed before the observed failure.
- Two bounded authorization attempts were consumed by the calling workflow. A third attempt is intentionally blocked until secure persistence is repaired or another supported secure persistence path exists.
- Exact-duplicate searches for
Platform secure storage failure: UNIX[Operation not permitted]found no matching issue. - Related but distinct reports include #38691 (noninteractive Keychain access from detached app-server processes) and #36453 (username/passphrase secure-storage failure). This report concerns the exact UNIX
Operation not permittedfailure on the active Codex macOS host.