[FEATURE] Support explicitly specifying location of pwsh.exe
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
This relates to https://github.com/anthropics/claude-code/issues/55190
From experimentation it seems claude.exe has many (undocumented) ways of locating pwsh.exe. This leads to quite a lot of complexity and variance around which powershell is getting picked up across workspaces. There seems to be no way to just configure claude.exe with the precise pwsh.exe that should be used.
It would be very helpful if we could specify this explicitly in settings.
Proposed Solution
.claude\settings.json could support something like "pwshPath" that takes a path to a pwsh.exe (possibly relative to the settings file or the dir above .claude)
Alternative Solutions
We've tried tightly controlling the PATH env var, stripping out all other directories containing powershell.exe and pwsh.exe but it can cause claude to fallback to powershell.exe instead of pwsh.exe in some setups without a separate global install of pwsh.exe.
Basically theres seems to be so much complexity that anything we've tried ends up doing the wrong thing for some setups, and it would just be great to cut through the complexity with a configuration option.
Priority
Medium - Would be very helpful
Feature Category
Configuration and settings
Use Case Example
For consistency and reliability of both human and agentic development workspaces we would:
- Vendor our pwsh.exe installation
- Point at it in our shared .claude\settings.json
- Benefit from all our agents getting the exact same pwsh.exe when invoking Powershell tool.
Additional Context
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗