[BUG] Startup keychain credentials error regression on MacOS.

Resolved 💬 4 comments Opened Mar 17, 2026 by ConanHorus Closed Apr 14, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

There is a regression introduced, likely with this changelog update for 2.1.77:

Faster startup on macOS (~60ms) by reading keychain credentials in parallel with module loading

Claude Code crashes on startup when the macOS security CLI binary is not executable (e.g., blocked by a Seatbelt sandbox profile). Previous versions gracefully fell back to the file-based credential store at ~/.claude/.credentials.json. The new version has an unhandled promise rejection from execFile('security', ...) that crashes the process.

What Should Happen?

Claude Code should catch the error from spawning security (whether EPERM, ENOENT, or any other failure) and fall back to reading credentials from ~/.claude/.credentials.json, as it did in previous versions.

Error Messages/Logs

Unhandled EPERM crashes the process:


EPERM: operation not permitted, posix_spawn 'security'
    path: "security",
 syscall: "posix_spawn",
   errno: -1,
    code: "EPERM"

      at spawn (unknown:1:1)
      at spawn (node:child_process:667:35)
      at execFile (node:child_process:59:20)
      at /$bunfs/root/src/entrypoints/cli.js:7057:6402

Steps to Reproduce

  1. Ensure valid credentials exist at ~/.claude/.credentials.json (the expected fallback path).
  2. Run Claude Code under a macOS Seatbelt sandbox (sandbox-exec) with a profile that denies execution of /usr/bin/security: (deny process-exec (literal "/usr/bin/security"))
  3. Launch claude.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.1.76

Claude Code Version

2.1.77 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Warp

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗