Locked Use auth plugin suspected in recurring hours-long macOS keybag lockouts (login keychain rejects correct credentials with CSSMERR_CSP_INVALID_DATA)
What version of the Codex App are you using (From "About Codex" dialog)?
ChatGPT.app 26.721.41059 (build 5848) — Computer Use / Locked Use installed via this app. The auth plugin bundle was /Library/Security/SecurityAgentPlugins/CodexComputerUseAuthorizationPlugin.bundle (bundle mtime 2026-06-02; Locked Use enabled ~2026-07-10).
What platform is your computer?
Mac Studio M4 Max (Mac16,9), macOS 26.5.2 (25F84), Apple silicon, FileVault ON. Input: Magic Keyboard with Touch ID.
What issue are you seeing?
Since enabling Locked Use, this machine has had 3 incidents of an hours-long "keybag lockout": during one screen unlock, the data-protection keybag unlock step fails; from that second on, the login keychain (and the modern keychain) become undecodable system-wide until a later unlock succeeds in unlocking the keybag. The GUI session itself unlocks and works normally the whole time — only keychain-backed things break (apps report "keychain locked"/auth errors; security show-keychain-info ~/Library/Keychains/login.keychain-db exits 51 "The user name or passphrase you entered is not correct" even though the password is correct and unchanged).
Incidents (all with the plugin installed; timestamps JST):
| # | Onset | Heal | Duration |
|---|-------|------|----------|
| 1 | 2026-07-16 17:28:33 | 2026-07-17 00:09:54 | ~6.7 h |
| 2 | 2026-07-18 16:20:37 | 2026-07-19 01:29:13 | ~9.1 h |
| 3 | 2026-07-27 10:48:29 | 2026-07-27 12:10:22 | ~1.4 h |
Onset signature (incident #3, unified log):
10:48:27.545 loginwindow: -[LWKeybagSupport nullKeybagUnlockForScreenLock] | MKBUnlockDevice returned: -3, so will return NO
10:48:29.194 loginwindow: -[LWScreenLockAuthentication _authSuccessUsingPassword:forUser:] | Unlock succeeded, with password, attempting to unlock the login keychain
10:48:29.216 securityd: CSSM Exception: -2147415994 CSSMERR_CSP_INVALID_DATA <-- first error, lockout begins
10:48:29.219 loginwindow: ... attempting to unlock the keybag <-- keybag unlock did not take effect
During an episode, secd also logs SecDbKeychainItemV7: cannot decrypt metadata key / decode item failed, keychain is locked, and in incidents #1/#2 loginwindow logged KeyBagUnlock ... err:-3 on the password path. The episode ends only when a later unlock actually unlocks the keybag (Unlock succeeded, with password, attempting to unlock the keybag succeeding, or securityd keybag already unlocked).
Key observation — credential in the log does not match the user's action: at the 10:48:29 onset the user is 100% certain they unlocked with Touch ID, yet loginwindow recorded a password-credential unlock ("Unlock succeeded, with password"). On the same day, other Touch ID unlocks on this machine logged the normal Touch ID form instead: Screen saver unlocked by admin, did NOT unlock the user's keychain (e.g. 11:55:53, plugin still installed, same keybag-locked conditions). So at the exact onset second, something submitted a password-shaped credential on the user's behalf, the session unlocked, but the keybag step failed — which matches an auth-plugin-vended credential whose keybag unlock is flaky. Earlier forensics (incident #2 era) also showed unlock lines with inpasswdsent:1 while the user was using Touch ID only.
During an episode, Touch ID unlock cycles do not heal it (3 consecutive attempts failed on 2026-07-27); a typed-password unlock healed it on the first try at 12:10:22. This is consistent with the plugin sitting in the system.login.screensaver authorization path (see #26319) and its unlock step being intermittent (see #32396 / #32913, "automatic unlock could not unlock it").
After disabling Locked Use in settings on 2026-07-27 ~12:00, the uninstall was clean on this machine (unlike #29350): the plugin bundle is gone from /Library/Security/SecurityAgentPlugins/, the right com.openai.sky.CUAService.AuthorizationPlugin.remote no longer exists (-60005), and system.login.screensaver is back to the default use-login-window-ui. We are now in a multi-week observation window: no further onsets with the plugin removed would confirm the plugin's involvement; a recurrence would exonerate it (and point at macOS 26.x itself).
Also filed with Apple as FB23809263 (macOS → Security), since a macOS 26.x keybag regression is the alternative hypothesis. Two sysdiagnoses exist (healthy state 2026-07-17, sick state 2026-07-19 01:22) and can be shared on request.
What steps can reproduce the bug?
Not reproducible on demand — the failing keybag step is intermittent. Conditions common to all 3 onsets:
- macOS 26.5.x, FileVault on, Locked Use enabled (plugin installed in
SecurityAgentPlugins). - Screen locks normally (e.g. display-dim auto lock); ChatGPT/Codex desktop processes active around the lock window.
- User unlocks (Touch ID); loginwindow logs a password-credential unlock instead; keybag unlock does not take effect → hours-long keychain lockout until a later unlock (typed password most reliable) unlocks the keybag.
Questions for the Codex team
- Does the Computer Use authorization plugin have a path where it submits a credential that unlocks the screen/session but leaves the user keybag locked (MKB error -3)? Incident #2's own logs showed exactly this pattern repeatedly while agents were driving the machine during screen lock.
- Is there telemetry / a known issue matching "keychain unusable for hours after an unlock while Locked Use is enabled"?
- Happy to provide the full log excerpts and sysdiagnoses.
2 Comments
Independent reproduction on a second machine, with a tighter causal sequence linking the Locked Use authorization mechanism to the keychain/keybag failure.
Environment
com.openai.codexcom.openai.sky.CUAService.AuthorizationPlugin, version 0.1.0, build 799system.login.screensavercurrently contains:Observed incident
On 2026-08-17, a normal local password unlock completed visually, but the login keychain and Data Protection Keychain became unusable system-wide immediately afterward.
The sanitized unified-log sequence for the same unlock event was:
From that point onward:
security show-keychain-info ~/Library/Keychains/login.keychain-dbrejected the correct, unchanged password withThe user name or passphrase you entered is not correct.This differs slightly from the original report: the user intentionally typed the password at the lock screen. The important observation is that
CodexComputerUseAuthorizationPlugin:allowran and screen authorization succeeded, but the keybag/keychain unlock did not complete. The failure begins in the same unlock transaction, immediately after the Codex authorization mechanism.This also resembles Apple's acknowledged authorization-plugin bug where screensaver unlock can fail to unlock the Data Protection Keychain (
FB13128730): https://developer.apple.com/forums/thread/796487. A separate macOS 26.4+ login-keychain regression is tracked asFB22448572: https://developer.apple.com/forums/thread/822120.Could the Codex team please investigate whether the Locked Use mechanism can authorize
system.login.screensaverwhile leaving the user's keybag or login keychain locked? Given the system-wide impact and the possibility of macOS moving an unrecoverable keychain aside after repeated failures, it may be safer to disable or bypass this authorization hook on affected macOS versions until the unlock path can guarantee keybag consistency.I can provide a longer sanitized unified-log excerpt and the
secdresource diagnostic through a private channel if useful. I am intentionally not posting the raw diagnostic publicly because it may contain private process and keychain metadata.Third independent reproduction, with a clean recovery sequence on the current Codex desktop build.
Environment
Onset
At 2026-08-18 08:02:46 PDT, a screen-unlock transaction began with:
The graphical session unlocked, but authenticated Keychain operations then failed system-wide for about 3 hours 38 minutes:
security show-keychain-info ~/Library/Keychains/login.keychain-dbexited 51 and rejected the correct, unchanged password.securitydcontinuously loggedCSSMERR_CSP_INVALID_DATA.Clean recovery
At 11:40:22, Locked Use was disabled through Codex settings. The authorization-plugin bundle was removed and
system.login.screensaverreturned to only:The screen was then locked and unlocked once using the typed macOS account password. At 11:41:01:
The
CSSMERR_CSP_INVALID_DATAerror storm stopped immediately, andsecurity show-keychain-infonow succeeds. No reboot, Keychain reset/deletion, password change, or credential recreation was performed.This does not by itself distinguish a Codex plugin defect from a macOS 26 keybag bug, but it provides another onset where the Codex authorization mechanism successfully authorized the screen while Keychain/keybag unlock failed, plus a clean mitigation sequence: remove Locked Use, then perform a real typed-password unlock.
I can provide a longer sanitized log excerpt privately if useful; raw diagnostics are intentionally not posted because they can contain process and Keychain metadata.