Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(shell): add ~/.local/bin to the Windows CLI resolver so native-installed providers are found #5074

Mergedarhxam(GitHub profile, opens in a new tab)merged 1 commit intomain fromrefs/pull/5074/headmerged by t3dotgg(GitHub profile, opens in a new tab) View on GitHub

What Changed

Added %USERPROFILE%\.local\bin to the known-Windows-CLI-directory list in both the shared resolveKnownWindowsCliDirs (packages/shared/src/shell.ts) and its desktop twin knownWindowsCliDirs (apps/desktop/src/shell/DesktopShellEnvironment.ts). Updated both existing byte-for-byte tests.

Why

Closes #4846.

On Windows the process can start with a stale PATH that predates the installer writing to the User Path, so both resolvers merge a fixed list of known CLI install dirs into PATH. That list included Bun and Scoop but not %USERPROFILE%\.local\bin — the directory the Claude native installer uses on Windows. So claude.exe at %USERPROFILE%\.local\bin\claude.exe was never discovered even though it was installed (same PATH-resolution family as #4697).

The two copies are kept in sync (server-side resolver + desktop shell environment). Reverting either source file fails its updated test; both pass with the change.

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • No UI changes

Note

Low Risk Small, additive PATH entry in two mirrored helpers with test-only verification; no auth or data handling changes.

Overview On Windows, when the process starts with a stale PATH, the app merges a fixed list of known CLI install directories so tools like npm, Bun, and Scoop still resolve. That list did not include %USERPROFILE%\.local\bin, where the Claude native installer (and similar tools) place binaries on Windows—so claude.exe could be installed but never found.

This PR adds %USERPROFILE%\.local\bin to that list in both places it is defined: shared resolveKnownWindowsCliDirs and desktop knownWindowsCliDirs, placed before .bun\bin and scoop\shims. Tests that assert the full merged PATH were updated accordingly.

Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 57add958be818a889f9b92ae6674c009b13bbaa7. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).

Note

Add ~/.local/bin to Windows CLI resolver so natively-installed providers are found

Adds %USERPROFILE%\.local\bin to the known Windows CLI directories in both shell.ts and DesktopShellEnvironment.ts. The path is inserted before .bun\bin and scoop\shims in the priority order, and is only included when USERPROFILE is set.

Macroscope summarized 57add95.
    1. Important

      Review skipped

      Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

      ⚙️ Run configuration

      Configuration used: Repository UI

      Review profile: CHILL

      Plan: Pro Plus

      Run ID: 7a76db77-92a1-415e-8ba1-7b770f0b2aca

      You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

      Use the checkbox below for a quick retry:

      • 🔍 Trigger review

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      ❤️ Share
      Comment `@coderabbitai help` to get the list of available commands.
    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. Approvability

      Verdict: Approved 57add95

      This PR adds ~/.local/bin to the Windows CLI path resolver search list. It's a simple additive change to an existing path array with corresponding test updates — no logic or behavioral changes beyond expanding the search scope.

      You can customize Macroscope's approvability policy. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).

Sign in to join this conversation.