[BUG] ${CLAUDE_PLUGIN_ROOT} portability

Resolved 💬 8 comments Opened Nov 19, 2025 by jtsylve Closed Mar 10, 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 plugin guide and example implementations suggest using the CLAUDE_PLUGIN_ROOT environment variable for portability. When running in Windows native (not WSL) CLAUDE_PLUGIN_ROOT is not compatible with bash paths.

When executing in cmd.exe, CLAUDE_PLUGIN_ROOT is set to a path that uses Windows-style back slashes. In Powershell, it uses forward slashes, but uses the C:/ prefix, which is also not compatible with bash.

CLAUDE_PLUGIN_ROOT should be normalized to work with Bash on all platforms.

What Should Happen?

Prompts that reference bundled scripts and execute them via bash should behave properly, regardless of operating system.

Error Messages/Logs

Steps to Reproduce

Create a plugin that has a bundled command which references and is instructed to execute a bundled shell script.

Follow the best practice guidance and reference the path to this bundled shell script using ${CLAUDE_PLUGIN_ROOT}/path/to/script.sh.

Install the plugin and execute the command. The command will likely fail to find the script because the unnormalized path will be malformed.

Claude Model

Not sure / Multiple models

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.0.47

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

_No response_

View original on GitHub ↗

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