Xcode 26.3 Claude Agent — 401 Invalid Bearer Token on Intel Mac (FB22141224)

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.

Same issue for me on M4 MacBook Pro

I’m experiencing the same issue on an M1 Max Mac Studio as well.

The only workaround I’ve found so far is to sign out of the Claude account and sign back in immediately after the error appears. That temporarily restores functionality, but the issue returns again after a couple of hours.

Seeing the same issue on mac M1, and only since upgrading to xcode 26.4 (did not experience this with previous releases)

Update: After extensive investigation I have identified what appears to be the root cause of the 401 Invalid Bearer Token error on my Intel Mac, and I want to share the findings in case they help others reporting similar issues on M1 and M4 machines.

WHAT I FOUND (Intel Mac - x86_64):

The Claude Agent binary that Xcode downloads is the darwin-arm64 build regardless of host architecture. On my Intel Mac this binary physically cannot execute, which fails silently and surfaces as a 401 error.

Confirmed via terminal:

file ~/Library/Developer/Xcode/CodingAssistant/Agents/claude/2.1.14/claude Returns: Mach-O 64-bit executable arm64 — wrong for Intel Mac

The IDEChatClaudeCodeVersion preference is hardcoded to the ARM64 download URL:

defaults read com.apple.dt.Xcode IDEChatClaudeCodeVersion Returns: darwin-arm64 URL regardless of CPU architecture

We also confirmed the darwin-x64 binary exists in Anthropic's distribution bucket and runs correctly on Intel — both in the terminal and as a standalone binary:

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 Returns: 2.1.14 (Claude Code) — works fine on Intel

Claude Code also works perfectly in Terminal on this Intel Mac. The problem is exclusively with the Claude Agent inside Xcode, which downloads and attempts to run the wrong ARM64 binary.

However, manually placing the x64 binary 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 Xcode's code signing verification also rejects the x64 binary, so there is currently no workaround for Intel Mac users wanting to use the Claude Agent inside Xcode.

Note: Claude chat in Xcode works perfectly on this Intel Mac — only the Agent and coding intelligence features are broken. This confirms the issue is the binary architecture, not account credentials, plan level, or network connectivity. Clearing all keychain entries, Xcode preferences, and cached credentials had no effect on the 401 error.

A bug report has been filed with Anthropic here: https://github.com/anthropics/claude-code/issues/40642

IMPORTANT QUESTION FOR M1/M4 USERS:

Since others on this thread are reporting the same 401 error on Apple Silicon machines where the ARM64 binary should work correctly, the architecture mismatch may not be the only cause of this error.

Could affected M1/M4 users please run the following in Terminal and post the results:

  1. Check the binary architecture:

file ~/Library/Developer/Xcode/CodingAssistant/Agents/claude/2.1.14/claude

  1. Check whether Claude chat works but agent features do not:

Try the coding assistant chat vs inline code fixes and agentic coding features and report which work and which fail.

  1. Check your Claude plan:

Pro, Max, Team, or Free

This will help determine whether there are multiple separate bugs causing the same 401 error on different hardware, or one common root cause affecting everyone.

If you are affected please also add a comment to the GitHub issue above with your Mac model and architecture so Anthropic can see the full scope of the problem.

Xcode 26.3 Claude Agent — 401 Invalid Bearer Token on Intel Mac (FB22141224)
 
 
Q