Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
Description:
After a recent Cursor CLI update on Windows, running agent (or cursor-agent) fails immediately with:
C:\Users\hugom\AppData\Local\cursor-agent\agent.ps1 : No version directories found in C:\Users\hugom\AppData\Local\cursor-agent
Environment
•
OS: Windows 10/11 (PowerShell 5.1.26100.8655)
•
Install path: %LOCALAPPDATA%\cursor-agent
•
Version directories present under versions:
◦
2026.06.16-20-30-07-a07d3ac
◦
2026.06.19-20-24-33-653a7fb
Root cause
The launcher scripts agent.ps1 and cursor-agent.ps1 filter version folders with this regex:
$name -match ‘^\d{4}.\d{1,2}.\d{1,2}-[a-f0-9]+$’
That pattern expects the old format: YYYY.MM.DD-
The installer now creates folders with a timestamp: YYYY.MM.DD-HH-MM-SS-
Because none of the installed version directories match the regex, the script exits with “No version directories found”.
Suggested fix
Update the regex in both agent.ps1 and cursor-agent.ps1 to accept the optional time segment:
$name -match ‘^\d{4}.\d{1,2}.\d{1,2}(-\d{1,2}-\d{1,2}-\d{1,2})-[a-f0-9]+$’
Optionally, update Parse-VersionString to include HH-MM-SS when sorting versions on the same day.
Workaround (local patch)
Manually edit the two .ps1 files under %LOCALAPPDATA%\cursor-agent\ with the regex above. After the change, agent --version works again. Note: a future CLI update may overwrite these files.
Steps to Reproduce
Install or update Cursor CLI on Windows.
2.
Confirm that %LOCALAPPDATA%\cursor-agent\versions\ contains folders in the new format, e.g. 2026.06.19-20-24-33-653a7fb.
3.
Open PowerShell and run agent or cursor-agent.
4.
Observe the error: No version directories found in C:\Users<user>\AppData\Local\cursor-agent.
To confirm the mismatch, inspect agent.ps1 line 48 — the regex only accepts YYYY.MM.DD-, not YYYY.MM.DD-HH-MM-SS-.
Expected Behavior
The launcher should detect the latest version directory under versions, then run the bundled node.exe and index.js for that version. Running agent --version should print the active CLI version (e.g. 2026.06.19-20-24-33-653a7fb).
Operating System
Windows 10/11
Version Information
CLI:
CLI Version 2026.06.19-20-24-33-653a7fb
OS win32 (x64)
Shell cmd / PowerShell 5.1.26100.8655
Subscription Tier Pro
Additional Information
Affected files: %LOCALAPPDATA%\cursor-agent\agent.ps1 and %LOCALAPPDATA%\cursor-agent\cursor-agent.ps1 (same logic in both).
•
The bug appears to be a mismatch between the installer (new folder naming) and the launcher scripts (old regex), not a missing installation.
•
Before applying the local regex patch, the CLI was completely non-functional on Windows — every invocation of agent failed at startup.
•
After manually updating the regex locally, agent about and agent --version work correctly with version 2026.06.19-20-24-33-653a7fb.
•
This workaround is fragile: the next official CLI update may overwrite the patched .ps1 files and break the CLI again
Does this stop you from using Cursor
Yes - Cursor is unusable