Xcode/codesign login keychain password issue

I’m trying to build and run a brand-new Xcode project created from the Audio Unit Extension App template for local macOS development on a brand-new Mac, and I’m blocked by a signing/keychain issue.

Environment:

macOS on a brand-new Mac Xcode 26.4.1 Build version 17E202 Personal Team Targeting My Mac Project type: Audio Unit Extension App

Main symptom:

During build/run, Xcode repeatedly shows this prompt:

codesign wants to access key "Apple Development: Sam Magnant (...)" in your keychain

It asks for the login keychain password.

Important detail My current Mac password successfully unlocks the login keychain manually in Keychain Access every time.

So the issue seems specific to Xcode / codesign using the Apple Development private key, not a general inability to unlock the keychain.

What I’ve already tried

  1. Reset the default keychain
  2. Logged out and back in after reset
  3. Changed my Mac account password to a new password
  4. Confirmed the login keychain unlocks manually with the current Mac password
  5. Deleted and recreated local Apple Development certificate/private key where possible
  6. Removed and re-added my Apple account in Xcode
  7. Checked the private key in Keychain Access
  8. Confirmed the private key exists under the Apple Development certificate
  9. Confirmed Allow all applications to access this item is already checked on the private key
  10. Removed App Groups and other extra capabilities to simplify the project
  11. Tried security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k '<current password>' ~/Library/Keychains/login.keychain-db
  12. Tried switching the project to simpler signing configurations, then switched back to standard Apple Development signing

What’s confusing

  • Xcode appears to know about an Apple Development certificate/private key
  • Keychain Access shows the identity under login > My Certificates
  • The login keychain unlocks fine manually
  • But codesign still prompts, and the machine reports 0 valid identities found

Questions

  1. What would cause Keychain Access to show the Apple Development identity, but security find-identity -v -p codesigning to report 0 valid identities found?
  2. Is this most likely a broken certificate/private key pairing, trust chain issue, or something specific to Personal Team signing?
  3. Is there a recommended way to fully repair the local Apple Development signing identity on the current macOS user account without creating a new macOS user?
  4. Are there known issues with the Audio Unit Extension App template and Personal Team local development on macOS?
Xcode/codesign login keychain password issue
 
 
Q