PC パソコン

Xcode “OAuth token expired”: Fix Claude Authentication in Xcode 26.0

When Claude is used from the Coding Assistant in Xcode 26.0, the assistant can suddenly stop responding and report an OAuth expiration error such as “OAuth token expired.” Apple states that Xcode 26.0.1 fixes an issue with the OAuth token expiration period and improves token caching when Claude is used in Xcode. This guide explains how to recover without mistaking the authentication failure for a project, signing, or build problem.

The error

OAuth token expired

The surrounding text or sign-in prompt may vary. The important diagnostic is that Xcode’s Claude integration reports an expired OAuth token.

Cause

This failure is caused by Claude authentication handling in Xcode 26.0, not by your source code, code-signing identity, or provisioning profile. Apple’s Xcode 26.0.1 release information says the update fixes an issue with the OAuth token expiration period and improves token caching for Claude in Xcode.

Key point: The message does not necessarily mean that your Claude account is disabled. If Xcode 26.0 is retaining or refreshing the authentication state incorrectly, resending the same prompt may not provide a lasting fix.

Affected conditions and versions

  • You are running Xcode 26.0.
  • You signed in to Claude for Xcode’s Coding Assistant.
  • The stored OAuth token expires, or Xcode’s cached authentication state is not refreshed correctly.

Apple identifies Xcode 26.0.1 as the version containing the fix. Later Xcode versions include the correction for this specific Xcode 26.0 issue.

Recommended fix

1. Check the active Xcode version

Choose “Xcode” → “About Xcode.” If the version is 26.0, update before changing project files or build settings.

2. Update to Xcode 26.0.1 or later

Install the update from the Mac App Store or Apple’s Xcode downloads. If several Xcode installations exist on the Mac, verify that the application you actually launch is the updated copy.

3. Quit and reopen Xcode

After updating, quit Xcode completely and open it again. Open the same workspace, start the Coding Assistant, and send a short prompt to Claude.

4. Sign in to Claude again if the error remains

Choose “Xcode” → “Settings” → “Intelligence,” then open the Claude settings. Use the More button (…) in the Account row and complete the sign-in flow again. Apple’s coding-intelligence setup documentation describes this Account-row and browser-based authentication flow.

Temporary alternatives when an update is blocked

If you cannot install Xcode 26.0.1 immediately, signing out of Claude in Intelligence settings and signing in again may refresh the current authentication state. Treat this only as a temporary workaround: Apple documents the permanent product fix in Xcode 26.0.1, and the problem can return while Xcode 26.0 remains installed.

For urgent work, you can install a fixed Xcode release alongside the existing copy and open the project with it. In a team, align the Xcode version to avoid unrelated differences in Swift, SDK, and build-tool behavior.

How to verify the fix

  1. Confirm in About Xcode that the version is 26.0.1 or later.
  2. Open Settings → Intelligence and verify that Claude is signed in.
  3. Start a new Coding Assistant conversation.
  4. Send a short prompt and confirm that “OAuth token expired” no longer appears.
  5. Optionally restart Xcode and test once more to confirm the cached authentication state remains valid.

Important notes

  • Deleting DerivedData, running Clean Build Folder, or recreating signing certificates does not address this authentication bug.
  • Your Apple Account session and your Claude session are separate. Check the Claude account under Intelligence settings.
  • A corporate proxy, VPN, or firewall can produce a different connectivity failure even after Xcode is updated.
  • If the problem continues, report the exact Xcode version, timestamp, displayed message, and result of signing in again through Feedback Assistant.

Summary

For “OAuth token expired” in the Claude integration of Xcode 26.0, the recommended solution is to update to Xcode 26.0.1 or later. Apple specifically fixed the OAuth token expiration-period issue and improved token caching in that release. If the message persists after the update, sign in to Claude again from Intelligence settings and verify the result in a new Coding Assistant conversation.

Official references