I've been investigating a persistent 401 Invalid Bearer Token error with Claude Agent in Xcode 26.3 on an Intel Core i9 Mac and wanted to share my findings here in case others are affected.
ENVIRONMENT
- Hardware: Intel Core i9 (x86_64)
- Xcode: 26.3 (17C529)
- macOS: 26.3 (25D125)
THE ISSUE Claude Agent fails with "Failed to authenticate. API Error: 401 - Invalid bearer token" on every prompt, despite the account showing as Signed In under Settings → Intelligence. The error persists after signing out and back in, and the token is confirmed valid and unexpired in Keychain.
WHAT WORKS
- Claude Code in Terminal works perfectly on the same machine with the same credentials
- The basic Claude Sonnet 4.5 coding assistant in Xcode works fine
- Only Claude Agent is affected
ROOT CAUSE HYPOTHESIS Xcode appears to be installing an ARM64 Claude binary on Intel Macs silently, with no warning or fallback. This binary likely fails to execute on x86_64 hardware and that failure is being misreported upstream as a 401 authentication error — which is why the error has nothing to do with the actual credentials.
APPLE'S RESPONSE Feedback report FB22141224 was closed as 'Works as currently designed' with the explanation that Claude Agent requires the Neural Engine found on Apple Silicon. However, Claude Agent calls Anthropic's remote API over the network and performs no on-device AI processing — the Neural Engine is not involved. The fact that Claude Code works fine on this same Intel Mac with the same credentials demonstrates this clearly.
WORKAROUND Using an Anthropic API key instead of OAuth resolves the issue but requires additional paid billing outside of an existing Claude.ai subscription.
Has anyone else experienced this on either Intel or Apple Silicon? I'd be particularly interested to hear if Apple Silicon users are also affected, as the Developer Forums suggest this may not be limited to Intel Macs (thread/816369).
Any input from Apple DTS engineers would be greatly appreciated.