Cursor-agent CLI (Windows): launcher regex rejects timestamped version folders, "No version directories found"

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

  1. 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.
  2. Run: cursor-agent --version (or: agent --version)
  3. 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

Hey, thanks for the report. Your root cause analysis and the suggested patch are super helpful, and your diagnosis is correct.

This is a known Windows bug: the launcher regex in cursor-agent.ps1 and agent.ps1 doesn’t match the new version folders that include a timestamp YYYY.MM.DD-HH-MM-SS-<commit>, so $versionDir ends up empty and you get “No version directories found”. We’re already tracking it, but there’s no ETA for a fix yet.

Your workaround is correct: update the regex to ^\d{4}\.\d{1,2}\.\d{1,2}-[-a-f0-9]+$ in %LOCALAPPDATA%\cursor-agent\cursor-agent.ps1 and agent.ps1. Like you noticed, it gets reverted on the next auto-update because the root launchers are overwritten by the bundled copy from the version folder. Until the fix ships, you’ll need to re-apply the change after updates, or as an alternative, rename the version folder to remove the time segment.

The same issue is discussed in this thread Agent.ps1 failed to launch (2026.06.11-03-15-00-241fc09). Subscribe there and we’ll post an update once the fix is out.

Hey, quick update on this bug: the regex fix in the launcher cursor-agent.ps1 / agent.ps1 is resolved on our side and is rolling out.

Try updating the CLI with agent update or reinstall it. After you update to the latest version, the fixed launcher won’t get reverted by auto-update anymore, so you won’t need the manual workaround of editing the regex.

If after updating cursor-agent --version / agent --version still says No version directories found, reply here with the installed version from agent --version and we’ll take a look.