claude-code - 💡(How to fix) Fix False positive PATH warning on Windows: .local/bin already in PATH [1 comments, 2 participants]

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…
GitHub stats
anthropics/claude-code#48068Fetched 2026-04-15 06:34:10
View on GitHub
Comments
1
Participants
2
Timeline
5
Reactions
0
Author
Timeline (top)
labeled ×4commented ×1

On Windows, Claude Code shows a startup warning:

Native installation exists but C:\Users\..\.local\bin is not in your PATH. Add it by...

This is a false positive. The directory is already present in both the Windows user PATH and Git Bash $PATH at runtime.

Root Cause

On Windows, Claude Code shows a startup warning:

Native installation exists but C:\Users\..\.local\bin is not in your PATH. Add it by...

This is a false positive. The directory is already present in both the Windows user PATH and Git Bash $PATH at runtime.

RAW_BUFFERClick to expand / collapse

Description

On Windows, Claude Code shows a startup warning:

Native installation exists but C:\Users\..\.local\bin is not in your PATH. Add it by...

This is a false positive. The directory is already present in both the Windows user PATH and Git Bash $PATH at runtime.

Environment

  • OS: Windows 11 Pro 10.0.26200
  • Shell: Git Bash (MSYS2)
  • Claude Code version: 2.1.107
  • Install path: C:\Users\XuanH\.local\bin\claude.exe

Steps to reproduce

  1. Install Claude Code natively on Windows (placed in ~/.local/bin/)
  2. Confirm C:\Users\XuanH\.local\bin is in Windows user PATH via [Environment]::GetEnvironmentVariable("PATH", "User")
  3. Confirm it is also in Git Bash $PATH at runtime
  4. Launch Claude Code — warning still appears

Expected behavior

No warning when .local\bin is already present in PATH.

Actual behavior

Warning fires on every startup as a false positive. The check appears to run before settings.json env injection takes effect, or reads a different PATH snapshot than what is actually set.

extent analysis

TL;DR

The false positive warning in Claude Code on Windows may be resolved by ensuring the PATH environment variable is correctly set and propagated to the application.

Guidance

  • Verify that the C:\Users\XuanH\.local\bin directory is correctly added to the Windows user PATH environment variable and that it is properly escaped in the PATH string.
  • Check the timing of when the PATH environment variable is set and when the warning check is performed in Claude Code to ensure they are using the same PATH snapshot.
  • Consider adding a debug log or print statement in Claude Code to output the PATH environment variable at the time of the warning check to compare with the expected value.
  • Review the settings.json file to ensure that any environment variable injections are correctly configured and take effect before the warning check.

Example

No code snippet is provided as the issue seems to be related to environment variable configuration rather than code.

Notes

The issue may be specific to the interaction between Windows, Git Bash, and Claude Code, and further investigation into the application's environment variable handling and warning check timing may be necessary.

Recommendation

Apply workaround: Modify the environment variable setting or the application's warning check to ensure they are using the same PATH snapshot, as upgrading to a fixed version is not mentioned in the issue.

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…

FAQ

Expected behavior

No warning when .local\bin is already present in PATH.

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 False positive PATH warning on Windows: .local/bin already in PATH [1 comments, 2 participants]