GeezerVison is showing github.com — fix(windows): discover Cursor Agent CLI install dir by aintoniodev · Pull Request #4569 · pingdotgg/t3code
Conversation
aintoniodev
commented
Jul 26, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- Add
%LOCALAPPDATA%\cursor-agent to resolveKnownWindowsCliDirs so Windows desktop can find the official Cursor Agent CLI even when the Electron process has a stale User PATH.
- Update shell unit tests that assert the known-dir PATH composition.
Why
On Windows, the Cursor Agent installer places agent.cmd / cursor-agent.cmd under %LOCALAPPDATA%\cursor-agent and updates User PATH. T3's Electron process can still miss that PATH entry (common after install without a full relaunch from a parent with a fresh environment). Provider health checks then report Cursor CLI command agent was not found even though the binary exists and agent --version works in a refreshed shell.
T3 already prepends known Windows CLI dirs (npm, node, Volta, pnpm, bun, scoop) via resolveWindowsEnvironment. Including the Cursor Agent install dir follows that pattern and removes the need for users to hardcode an absolute binaryPath.
Reproduced locally: installed CLI present + on User PATH, T3 still failed until providers.cursor.binaryPath was set to the absolute agent.cmd path. After this fallback, discovery should succeed without that workaround.
Official install docs: https://cursor.com/docs/cli/installation
Test plan
-
vp test run packages/shared/src/shell.test.ts (29/29 pass)
- On Windows desktop: install Cursor CLI, leave default/binary name
agent or cursor-agent, ensure User PATH includes %LOCALAPPDATA%\cursor-agent but launch T3 from a process that may have a stale PATH; Cursor provider should become installed / ready without setting an absolute binary path
- Confirm absolute
binaryPath override still works
Checklist
- This PR is small and focused
- I explained what changed and why
- No UI changes
Note Low Risk
Small additive PATH fallback in shared shell utilities; no auth, security, or data-path changes.
Overview
Adds %LOCALAPPDATA%\cursor-agent to the known Windows CLI install directories in resolveKnownWindowsCliDirs, so resolveWindowsEnvironment prepends that folder to PATH the same way it already does for npm, Node, Volta, pnpm, bun, and scoop.
This is meant to fix Cursor provider health checks when the Electron process has a stale User PATH after installing the official Cursor Agent CLI, so agent / cursor-agent can be resolved without setting an absolute binaryPath.
Unit tests for resolveKnownWindowsCliDirs and resolveWindowsEnvironment PATH composition were updated to include the new directory.
Reviewed by Cursor Bugbot for commit cbf8036. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Add Cursor Agent CLI install dir to Windows PATH discovery
Extends resolveKnownWindowsCliDirs in shell.ts to include the cursor-agent directory under LOCALAPPDATA when that environment variable is defined. This brings Cursor Agent in line with other LOCALAPPDATA-based tools already discovered on Windows.
Macroscope summarized cbf8036.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Electron processes can miss a newly updated User PATH, so T3 failed to
find agent/cursor-agent even when the official Windows installer had
placed binaries under %LOCALAPPDATA%\cursor-agent. Include that directory
in the known Windows CLI PATH fallbacks, matching npm/node/volta/pnpm.
Co-authored-by: Cursor <[email protected]>
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: 634d787e-0868-4110-ad49-c71a64208c2d
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:
✨ Finishing Touches
🧪 Generate unit tests (beta)
- Create PR with unit tests
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.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved
This change simply adds 'cursor-agent' to the list of known Windows CLI directories to search, following the existing pattern. It's a minimal, additive change with updated tests and no runtime risk.
You can customize Macroscope's approvability policy. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Aug 18, 2026
|
Confirming this on current Windows desktop after the official irm installer: cursor-agent is on User PATH under %LOCALAPPDATA%\cursor-agent, a new PowerShell finds it, and T3 still reports not found.
This PR's known-dir change looks right for the installer location, but desktop still has a second copy of that list in DesktopShellEnvironment.ts, so a shared-only patch would not reach the Electron app.
Filed #7360 and opened #7362 which also reads Machine+User PATH and points desktop at the shared helpers. Happy to close 7362 as redundant if this lands first and desktop is updated here.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Note 🤖 GPT-5.6 Sol responding on behalf of Theo
We're closing this PR as we clean up the T3 Code backlog. Thank you for taking the time to put this together.
The Windows Cursor Agent discovery problem is real. We are keeping the fix in the open #7362, which repairs User PATH discovery for provider CLIs instead of adding one Cursor-only install directory.
If you believe we closed this in error, please reopen the PR and leave a comment explaining what we missed.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:XS
0-9 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|