[BUG] Xcode Claude Agent reports "Please authenticate" when ~/Library/Keychains is blocked in Xcode's Agent File & Folder Access settings
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?
When ~/Library/Keychains is set to "No Access" in Xcode's agent file permissions (Settings → Intelligence → Permissions → Control File & Folder Access), Claude Agent can't read its OAuth credential from the login keychain. It then reports this as the user not being signed in, instead of as a Keychain access error, causing confusion that is difficult to troubleshoot even by the AI agent itself.
Symptoms:
- Settings → Intelligence → Claude Agent shows the account as signed in.
- Signing in succeeds and creates the "Claude Code-credentials" Keychain item.
- Claude chat (Claude Sonnet) in Xcode works normally.
- Every Claude Agent prompt immediately returns: "Please authenticate with Claude Agent by going to Settings → Intelligence → Claude Agent → Sign In. After signing in, create a new conversation for the authentication settings to take effect."
- Signing out and back in, deleting the Keychain item, reinstalling the Claude Agent component, and reinstalling Xcode don't help, because the permission rules persist across reinstalls.
This sends users on a long chase through OAuth, browser, and Keychain troubleshooting when the actual cause is a single permission rule.
Expected Behavior
Either:
- the agent reports that it can't read its credential from Keychain because of the file access rules, and says which folder needs access; or
- Xcode warns when a rule blocks a path the agent needs to authenticate.
Actual Behavior
The agent says the user isn't authenticated, even though Settings shows them as signed in.
Workaround
Set ~/Library/Keychains to Read & Write (or click "Reset to Default…"), or turn off Control File & Folder Access. Then sign in again and start a new conversation.
Error Messages/Logs
Error Message: "Please authenticate with Claude Agent by going to Settings → Intelligence → Claude Agent → Sign In. After signing in, create a new conversation for the authentication settings to take effect."
Steps to Reproduce
- In Xcode → Settings → Intelligence → Permissions, turn on Control File & Folder Access.
- Set
~/Library/Keychainsto No Access. - Sign in to Claude Agent under Settings → Intelligence → Claude Agent.
- Start a new Claude Agent conversation and send any message.
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.220 (bundled by Xcode)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other
Additional Information
Environment
- Claude Agent (Claude Code) version: 2.1.220 (bundled by Xcode)
- Xcode: 27
- macOS: 27
- Hardware: Apple Silicon (arm64) M1 Pro
- Plan: Claude Max
Also reported to Apple via Feedback Assistant