[BUG] API Error: EEXIST: file already exists, mkdir — regression in native builds > 2.1.87 (Windows + Google Drive)

Resolved 💬 3 comments Opened Apr 9, 2026 by boomcycle Closed Apr 13, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report
  • [x] I am using the latest version of Claude Code

What's Wrong?

Every API call fails with:

API Error: EEXIST: file already exists, mkdir 'C:\GDRIVE\CODEFILES\.claude'

Skills load fine on startup (17 skills). The error only occurs on the first API request after startup, not during initialization.

The .claude directory exists and is fully populated — sessions, plugins, cache, hooks, credentials, skills, settings, history, etc.

Environment

  • Claude Code v2.1.98 (native auto-update, Windows)
  • Windows with Google Drive for Desktop
  • CLAUDE_CONFIG_DIR on a Google Drive-synced path via NTFS junction point
  • Node.js 18+

To Reproduce

  1. Install Claude Code via native auto-update (version 2.1.98 or similar post-2.1.87 build)
  2. Set CLAUDE_CONFIG_DIR to a path on a Google Drive for Desktop volume (e.g., via an NTFS junction point)
  3. Launch Claude Code from any working directory
  4. Send any prompt — API call fails with EEXIST

Workaround

Downgrading to 2.1.87 via npm install -g @anthropic-ai/claude-code@2.1.87 resolves the issue immediately. Same config, same paths, same machine, same Google Drive setup — works perfectly on 2.1.87. Breaks on 2.1.98.

Note: this setup worked flawlessly for two weeks before the auto-update to 2.1.98.

Likely Cause

A mkdir call introduced or changed between 2.1.87 and 2.1.98 that doesn't handle Google Drive for Desktop's virtual filesystem driver correctly. Google Drive for Desktop on Windows uses a user-mode filesystem (not standard NTFS), and fs.mkdirSync with {recursive: true} may not behave identically on this driver.

The error path is always the CLAUDE_CONFIG_DIR root (.claude), not a subdirectory.

Related: /heapdump had a similar EEXIST fix on Windows in a prior release.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗