I'm also seeing exactly the same issue with Sequoia 15.4.1 and Xcode 16.2 two. I have multiple Mac Minis (M2 and currently setting up some M1s) setup as Gitlab CI runners, and the Apple IDs for code signing randomly get removed after a random period of time.
I tried running:
defaults write com.apple.dt.Xcode DVTDeveloperAccountUseKeychainService -bool NO to store it outside the keychain, but this doesn't appear to make a difference.
What is interesting is when re-adding the account, I no longer get prompted for 2FA, requiring only a password, which suggests the trusted status for the account is being cached somewhere correctly...
Topic:
Developer Tools & Services
SubTopic:
Xcode
Tags: