claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Windows: Claude Code 2.0.65 fails with ENOENT error due to colons in MCP log directory paths

Open tpeterson1-jeff opened this issue 1 month ago • 5 comments

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?

Claude Code version 2.0.65 fails to start on Windows with the error:

Error: ENOENT: no such file or directory, mkdir 'C:\Users...\mcp-logs-plugin:ibond-claude-plugin:ibond-mcp'

$ claude
node:fs:1366
  const result = binding.mkdir(
                         ^

Error: ENOENT: no such file or directory, mkdir 'C:\Users\tpeterson1\AppData\Local\claude-cli-nodejs\Cache\C--Users-tpeterson1-work-analysis\
mcp-logs-plugin:ibond-claude-plugin:ibond-mcp'
    at Module.mkdirSync (node:fs:1366:26)
    at file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:9:1826
    at NI (file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:8:8084)
    at Object.mkdirSync (file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:9:1782)
    at writeFn (file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:13:152)
    at Timeout.I [as _onTimeout] (file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:9:26905)
    at listOnTimeout (node:internal/timers:614:17)
    at process.processTimers (node:internal/timers:549:7) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'mkdir',
  path: 'C:\\Users\\tpeterson1\\AppData\\Local\\claude-cli-nodejs\\Cache\\C--Users-tpeterson1-work-analysis\\mcp-logs-plugin:ibond-claude-plu
gin:ibond-mcp'
}

Node.js v23.1.0


Root Cause: Claude Code constructs MCP log directory paths using the pattern: mcp-logs-plugin:{plugin-name}:{mcp-server-name}

The colons (:) are illegal characters in Windows file/directory names, causing the mkdir operation to fail.

Environment:

  • OS: Windows 10/11
  • Node.js: v23.1.0
  • Claude Code: 2.0.65 (broken) / 2.0.64 (works)
  • Plugins: Custom MCP plugins with multiple servers

Reproduction:

  1. Install Claude Code 2.0.65 on Windows
  2. Install any plugin with MCP servers
  3. Run claude
  4. Observe ENOENT error with colons in path

Workaround: Downgrade to 2.0.64: npm install -g @anthropic-ai/[email protected]

Suggested Fix: Sanitize MCP log directory names by replacing colons with underscores or hyphens:

  • Current: mcp-logs-plugin:ibond-claude-plugin:ibond-mcp
  • Fixed: mcp-logs-plugin_ibond-claude-plugin_ibond-mcp

What Should Happen?

Claude should start

Error Messages/Logs

$ claude
node:fs:1366
  const result = binding.mkdir(
                         ^

Error: ENOENT: no such file or directory, mkdir 'C:\Users\tpeterson1\AppData\Local\claude-cli-nodejs\Cache\C--Users-tpeterson1-work-analysis\
mcp-logs-plugin:ibond-claude-plugin:ibond-mcp'
    at Module.mkdirSync (node:fs:1366:26)
    at file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:9:1826
    at NI (file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:8:8084)
    at Object.mkdirSync (file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:9:1782)
    at writeFn (file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:13:152)
    at Timeout.I [as _onTimeout] (file:///C:/Users/tpeterson1/AppData/Roaming/npm/node_modules/@anthropic-ai/claude-code/cli.js:9:26905)
    at listOnTimeout (node:internal/timers:614:17)
    at process.processTimers (node:internal/timers:549:7) {
  errno: -4058,
  code: 'ENOENT',
  syscall: 'mkdir',
  path: 'C:\\Users\\tpeterson1\\AppData\\Local\\claude-cli-nodejs\\Cache\\C--Users-tpeterson1-work-analysis\\mcp-logs-plugin:ibond-claude-plu
gin:ibond-mcp'
}

Node.js v23.1.0

Steps to Reproduce

With MPC servers configured via plugins, start Claude on Windows.

Claude Model

Sonnet (default)

Is this a regression?

Yes, this worked in a previous version

Last Working Version

2.0.64

Claude Code Version

2.0.65 (Claude Code)

Platform

AWS Bedrock

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

tested in Git Bash, CMD, and PowerShell.

tpeterson1-jeff avatar Dec 11 '25 12:12 tpeterson1-jeff

also impacts my plugin: https://github.com/nikiforovall/claude-code-rules; plugins that contain mcp make claude to crash on start; this is a blocker

NikiforovAll avatar Dec 11 '25 14:12 NikiforovAll

I have the same issue with version 2.0.65. 2.0.64 runs fine.

apoufortin avatar Dec 11 '25 16:12 apoufortin

Yeah, same for me... Although it's not a problem with 2.0.65 specifically, i had this issue for a few days, and the workaround until now was to run claude with npx

Error: ENOENT: no such file or directory, mkdir 'C:\Users\AppData\Local\claude-cli-nodejs\Cache\D--Projects-inspekter-claude\mcp-logs-plugin:compound-engineering:pw' at Module.mkdirSync (node:fs:1349:26) at file:///.../@anthropic-ai/claude-code/cli.js:9:1826 ... code: 'ENOENT', path: 'C:\Users\AppData\Local\claude-cli-nodejs\Cache\D--Projects-inspekter-claude\mcp-logs-plugin:compound-engineering:pw'

noises1990 avatar Dec 11 '25 19:12 noises1990

I had to rollback to 2.0.63 on Windows with PowerShell and Git for Windows.

mcdow-webworks avatar Dec 11 '25 23:12 mcdow-webworks