claude-code - 💡(How to fix) Fix [BUG] Windows: ENOENT mkdir 'E:\claude-tmp\...\tasks' — all Bash tool calls fail

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Error: ENOENT: no such file or directory, mkdir 'E:\claude-tmp\claude\E--Claude-Projects\76bd7b6a-15e7-4c9d-80be-bcabfd4b8fa3\tasks'

Also seen with leading space variant: Error: ENOENT: no such file or directory, mkdir ' E:\claude-tmp\claude\E--Claude-Projects<session-id>\tasks'

Fix Action

Fix / Workaround

Workaround attempted: community-suggested launch_claude.bat that sanitizes TMP/TEMP/CLAUDE_* env vars for the child process. Does not reliably fix the issue — fresh sessions launched via the .bat still hit the same ENOENT on the claude-tmp tasks directory.

Code Example

Error: ENOENT: no such file or directory, mkdir 'E:\claude-tmp\claude\E--Claude-Projects\76bd7b6a-15e7-4c9d-80be-bcabfd4b8fa3\tasks'

Also seen with leading space variant:
Error: ENOENT: no such file or directory, mkdir ' E:\claude-tmp\claude\E--Claude-Projects\<session-id>\tasks'
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • I am using the latest version of Claude Code

What's Wrong?

Every Bash tool call in a Claude Code session on Windows fails immediately with:

Error: ENOENT: no such file or directory, mkdir 'E:\claude-tmp\claude\E--Claude-Projects<session-id>\tasks'

Sometimes the path has a leading space inside the quoted string (' E:\claude-tmp...'), sometimes not. Either form blocks all shell execution — python, curl, psql, git, everything.

The session can still use Read/Write/Edit/Grep, but without Bash the agent cannot run, verify, or test anything. Entire sessions are wasted retrying.

Impact: Claude Code is effectively unusable for real engineering work on Windows until this is fixed.

What Should Happen?

Bash tool calls should succeed. The agent should be able to run python, curl, git, psql, and other shell commands without the ENOENT mkdir error on the claude-tmp tasks directory.

Error Messages/Logs

Error: ENOENT: no such file or directory, mkdir 'E:\claude-tmp\claude\E--Claude-Projects\76bd7b6a-15e7-4c9d-80be-bcabfd4b8fa3\tasks'

Also seen with leading space variant:
Error: ENOENT: no such file or directory, mkdir ' E:\claude-tmp\claude\E--Claude-Projects\<session-id>\tasks'

Steps to Reproduce

  1. Install Claude Code on Windows (MSIX / Microsoft Store build, v2.1.101)
  2. Open a project located on a non-C: drive (e.g. E:\Claude Projects)
  3. Start a new session with any model (tested on Opus 4.6)
  4. Ask the agent to run any shell command that invokes the Bash tool Example prompt: "run: curl https://example.com"
  5. First Bash call fails immediately with: Error: ENOENT: no such file or directory, mkdir 'E:\claude-tmp\claude\E--Claude-Projects<session-id>\tasks'
  6. Every subsequent Bash call in the same session fails with the same error
  7. Exiting and starting a new session does not fix it — same error reappears

The claude-tmp directory parent path is never created by Claude Code on startup, so any child mkdir for the session-specific tasks folder fails.

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

2.1.101

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

Workaround attempted: community-suggested launch_claude.bat that sanitizes TMP/TEMP/CLAUDE_* env vars for the child process. Does not reliably fix the issue — fresh sessions launched via the .bat still hit the same ENOENT on the claude-tmp tasks directory.

This bug has been reported via email to [email protected] without a human response, and via Fin AI bot which redirected here.

The MSIX install location (C:\Users<user>\AppData\Local\Packages...) combined with the project being on E:\ appears to trigger the claude-tmp path resolution to create directories under E:\claude-tmp\ which Claude Code cannot create or access.

extent analysis

TL;DR

The most likely fix involves ensuring the claude-tmp directory is created and accessible before attempting to create session-specific subdirectories.

Guidance

  • Verify that the claude-tmp directory exists and is writable by the Claude Code process, potentially by manually creating it or adjusting permissions.
  • Investigate why the claude-tmp directory is being resolved to E:\claude-tmp instead of a more expected location like C:\Users\<user>\AppData\Local\Temp or a subdirectory of the Claude Code installation.
  • Consider modifying the launch process to explicitly set the TMP and TEMP environment variables to a known, writable location before starting Claude Code.
  • Test whether the issue persists when the project is located on the C: drive, to isolate if the problem is drive-specific.

Example

No specific code snippet is provided due to the nature of the issue, but an example of setting environment variables before launching Claude Code could look like:

set TMP=C:\Users\<user>\AppData\Local\Temp
set TEMP=C:\Users\<user>\AppData\Local\Temp
launch_claude.bat

However, this is speculative and may not directly address the root cause.

Notes

The exact solution may depend on specifics of the Windows environment, the MSIX installation, and how Claude Code resolves temporary directory paths. The provided launch_claude.bat workaround's inconsistency in resolving the issue suggests there might be additional factors at play.

Recommendation

Apply a workaround by manually creating the claude-tmp directory in a known, writable location (e.g., C:\Users\<user>\AppData\Local\Temp\claude-tmp) and ensure it is accessible before launching Claude Code. This approach may mitigate the immediate issue while a more permanent fix is developed.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Windows: ENOENT mkdir 'E:\claude-tmp\...\tasks' — all Bash tool calls fail