[BUG] Claude Agent in Xcode downloads ARM64 binary on Intel Macs, x64 binary rejected due to code signing
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?
On Intel Macs, Xcode downloads the darwin-arm64 binary for the Claude Agent, which cannot execute on x86_64 hardware. The binary fails silently and returns a 401 Invalid Bearer Token error in Xcode's Intelligence settings, even with valid Pro account credentials and a working API key. Claude chat within Xcode works fine, as it communicates directly with Anthropic's API. Only the Claude Agent/coding intelligence features are affected.
Manually downloading the correct darwin-x64 binary and placing it in the agent directory fails with:
"Failed to initialize Claude Agent: The code signing identity for the agent did not match expectations, or the agent violated sandboxing rules."
This means Intel Mac users cannot use the Claude Agent in Xcode at all, regardless of plan or credentials.
What Should Happen?
Xcode should detect the host Mac architecture before downloading the Claude Agent binary. On an Intel Mac it should request the darwin-x64 binary. On Apple Silicon it should request darwin-arm64. Alternatively, Anthropic could ship a universal binary containing both architectures which would work on any Mac regardless of CPU.
After a fix, the expected behaviour is:
- Click Get in Xcode Intelligence settings
- Xcode downloads the correct binary for the host CPU
- Sign in with Claude Pro account or API key
- Green status indicator appears next to Claude Agent
- Coding intelligence and agentic coding features work correctly
Error Messages/Logs
401 Invalid Bearer Token (shown in Xcode Intelligence settings after signing in)
Failed to initialize Claude Agent: The code signing identity for the agent did not match expectations, or the agent violated sandboxing rules. Please delete the currently selected agent in the Components section of Settings and download it again.
Terminal confirmation of wrong architecture:
$ file ~/Library/Developer/Xcode/CodingAssistant/Agents/claude/2.1.14/claude
Mach-O 64-bit executable arm64
$ defaults read com.apple.dt.Xcode IDEChatClaudeCodeVersion
{"url":"https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.14/darwin-arm64/claude","version":"2.1.14","checksum":"e0b46113b66a91db787e01bca0f5baa262ce4308852baf8a2d32ea504053fd11ab31c0ac5ccc88800d7a6c633ccd26ef003261ac5005b1c448fbaf307310cf71"}
Steps to Reproduce
- On an Intel Mac running macOS 26.3, open Xcode 26.3
- Go to Settings → Intelligence → Anthropic
- Click Get to download the Claude Agent
- Sign in with a valid Claude Pro account or API key
- Attempt to use any coding intelligence or agent feature
Result: 401 Invalid Bearer Token error. Claude chat works fine but all coding intelligence features fail.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.14 (Claude Code) - terminal version works correctly on Intel
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
Full investigation performed:
- Cleared all keychain entries for Claude and Anthropic - no effect
- Cleared all Xcode defaults related to Claude - no effect
- Deleted and re-downloaded Claude Agent multiple times - no effect
- Confirmed darwin-x64 binary exists in Anthropic's distribution bucket and runs correctly on this Intel Mac:
$ curl -fsSL -o /tmp/claude-x64 "https://storage.googleapis.com/claude-code-dist-86c565f3-f756-42ad-8dfa-d59b1c096819/claude-code-releases/2.1.14/darwin-x64/claude"
$ /tmp/claude-x64 --version
2.1.14 (Claude Code)
- Manifest confirms x64 binary exists with correct checksum:
darwin-x64 checksum: 0b44e49b28755dc3e42e7bdd20e9a91da79c78b1bd216141f06f96792d31b23c
darwin-x64 size: 184243008
- Manually updated IDEChatClaudeCodeVersion to point to darwin-x64 URL - Xcode downloaded the correct binary but rejected it with code signing error, meaning the code signing verification is also architecture-specific.
The 401 error is misleading - it is not a credentials problem. It is caused by Xcode running an ARM64 binary on an Intel CPU which fails silently and surfaces as an authentication error. All credentials and account settings are valid as confirmed by Claude chat working correctly in Xcode.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗