[BUG] Write tool fails for plan files when workspace and ~/.claude are on different drives (Windows)

Resolved 💬 2 comments Opened Apr 6, 2026 by HasseM Closed May 17, 2026

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?

The Write tool fails when creating or updating plan files because the plans directory (~/.claude/plans/ on C:\) is on a different drive than the workspace (e.g. V:\). The Write tool requires a path.relative()'d string and cannot resolve a cross-drive absolute path. Claude then falls back to bash cat > which works but wastes tokens on every plan create/update.

What Should Happen?

The Write tool should handle absolute paths to the plans directory, even when it's on a different drive than the workspace root. Plan creation and updates should succeed on the first attempt without a bash fallback.

Error Messages/Logs

path should be a `path.relative()`d string, but got "C:\Users\<user>\.claude\plans\sharded-tinkering-whatever.md"

Steps to Reproduce

  1. On Windows, open a VSCode workspace on a non-C: drive (e.g. V:\project)
  2. Start Claude Code via the VSCode extension
  3. Enter plan mode or let Claude create a plan
  4. Observe the Write tool failure in the output, followed by a bash cat > fallback

Claude Model

Opus

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

latest

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

VS Studio Code Extention.

The root cause is that path.relative() on Windows cannot produce a valid relative path between two different drive letters (C:\ and V:\). It returns the absolute path of the target, which the Write tool then rejects. This affects any Windows user whose workspace is on a different drive than their user profile. The issue likely also affects the memory system (also stored under ~/.claude/) for the same reason.

View original on GitHub ↗

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