Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
On Windows, the cursor-agent CLI fails to start. Running it errors with:
cursor-agent.ps1 : No version directories found in C:\Users<user>\AppData\Local\cursor-agent
…even though valid installs exist under the versions\ folder.
Root cause: the version-folder detection regex in cursor-agent.ps1 and agent.ps1 only accepts the format YYYY.MM.DD-:
$name -match '^\d{4}\.\d{1,2}\.\d{1,2}-[a-f0-9]+$'
But the installed version folders now include a TIME component, e.g.:
2026.06.12-19-59-36-f6aba9a
2026.06.15-03-48-54-da23e37
The -19-59-36 / -03-48-54 segment (extra digits and dashes) fails the [a-f0-9]+$ part, so no folder matches, $versionDir ends up null, and the launcher exits with “No version directories found”. The installs themselves are perfectly fine - only the launcher’s folder-name matching is wrong.
This is recurring: the root launcher scripts are byte-identical copies mirrored up from the newest versions<ver> folder on each update (verified via file hashes), and the bundled launcher inside the version folder still contains the old regex - so every auto-update re-breaks the CLI.
Steps to Reproduce
- On Windows, have cursor-agent installed with version folders named in the timestamped format YYYY.MM.DD-HH-MM-SS-hash (e.g. 2026.06.15-03-48-54-da23e37) under %LOCALAPPDATA%\cursor-agent\versions.
- Run: cursor-agent --version (or: agent --version)
- Observe the error: cursor-agent.ps1 : No version directories found in C:\Users<user>\AppData\Local\cursor-agent
Expected Behavior
The launcher should detect version folders that include the time component and run the newest one.
Suggested fix - relax the regex in cursor-agent.ps1 / agent.ps1 (and the bundled copies inside each version folder) to allow dashes in the suffix:
$name -match '^\d{4}\.\d{1,2}\.\d{1,2}-[-a-f0-9]+$'
Alternatively, align the version-folder naming with what the launcher already expects. The .sh / Unix launcher equivalents should be checked for the same assumption.
Operating System
Windows 10/11
Version Information
CLI:
CLI Version 2026.06.15-03-48-54-da23e37
(also reproduced with 2026.06.12-19-59-36-f6aba9a)
OS: Windows 10 (build 10.0.26200)
Shell: PowerShell
Additional Information
Manual workaround that restores functionality until the next update: edit %LOCALAPPDATA%\cursor-agent\cursor-agent.ps1 and agent.ps1, changing the regex to ^\d{4}.\d{1,2}.\d{1,2}-[-a-f0-9]+$. After that both cursor-agent --version and agent --version work again and correctly select the newest version. The fix gets reverted on the next auto-update because the root launchers are overwritten with the version folder’s bundled (still-buggy) copies.
Does this stop you from using Cursor
Yes - Cursor is unusable