claude-code - 💡(How to fix) Fix [FEATURE] Support explicitly specifying location of pwsh.exe

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…
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • 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:

  1. Vendor our pwsh.exe installation
  2. Point at it in our shared .claude\settings.json
  3. Benefit from all our agents getting the exact same pwsh.exe when invoking Powershell tool.

Additional Context

No response

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 [FEATURE] Support explicitly specifying location of pwsh.exe