[BUG] Bash tool EINVAL on Windows when project path generates long temp directory name

Resolved 💬 5 comments Opened Feb 25, 2026 by mayniac24 Closed Feb 25, 2026

Bug

Every Bash tool invocation fails with EINVAL: invalid argument, open before the command even executes. The error points to the temp output file path.

Error

EINVAL: invalid argument, open 'C:\Users\Evan-PC\AppData\Local\Temp\claude\C--Users-Evan-PC-Documents-Organize-IT-Notes-The-inner-ravings-of-a-mayniac\tasks\bb8rst1ix.output'

Environment

  • OS: Windows 10 Education 10.0.19045
  • Shell: Git Bash (MINGW64)
  • Claude Code version: 2.1.53 (standard native installer)
  • LongPathsEnabled: 1 (registry confirmed)
  • Project path: C:\Users\Evan-PC\Documents\Organize IT\Notes\The inner ravings of a mayniac

Root Cause

The project directory path is slugified into the temp directory name (C--Users-Evan-PC-Documents-Organize-IT-Notes-The-inner-ravings-of-a-mayniac), creating a deeply nested temp path. The combined path to the .output file exceeds a limit or contains characters Windows rejects, even with LongPathsEnabled=1.

This worked in a prior session the same day — the Bash tool was running pipelines successfully earlier. The issue appeared after an auto-update to 2.1.53.

The MCP memory server also broke in the same update, suggesting a broader regression in the release.

Reproduction

  1. Install Claude Code 2.1.53 on Windows
  2. Open Claude Code in a project with a long directory path (5+ nested folders with spaces)
  3. Run any Bash command (e.g., ls)
  4. Observe EINVAL error — command never executes

Expected Behavior

Bash tool should use shorter temp directory names (e.g., a hash of the project path) instead of the full slugified path.

Workaround

Downgrade with claude update <previous-version> and pin minVersion in settings.

View original on GitHub ↗

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