[Bug] agent.ps1 install script fails on Windows due to strict regex on timestamped version folders

Describe the Bug

Description:
When running the Windows installation script (irm 'https://cursor.com/install?win32=true' | iex), the payload downloads successfully, but the wrapper script (agent.ps1) throws the following error:
No version directories found in C:\Users\...\AppData\Local\cursor-agent

Root Cause:
The installer downloads the payload into a timestamped directory format (e.g., 2026.06.19-20-24-33-653a7fb), but the regex in agent.ps1 used to validate the version directory is too strict and doesn’t account for the time/hour hyphens.

In agent.ps1:
$name -match '^\d{4}\.\d{1,2}\.\d{1,2}-[a-f0-9]+$'

Because of the extra -20-24-33 in the folder name, the regex fails, returning no valid directories, even though the Node payload is sitting right there.

Proposed Fix:
Update the regex in agent.ps1 to handle the timestamp variables before the commit hash. For example:
$name -match '^\d{4}\.\d{1,2}\.\d{1,2}.*-[a-f0-9]+$'

Environment:

  • OS: Windows 11
  • Shell: PowerShell 7 / Windows PowerShell

Steps to Reproduce

irm ‘Cursor CLI — Run Agents in Terminal, GitHub Actions and Automations & Scripts’ | iex

agent

Expected Behavior

launch agent file

Operating System

Windows 10/11

Version Information

2026.06.19-20-24-33-653a7fb

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report. Your diagnosis and the suggested fix are correct. This is a known bug on our side. On Windows, the launcher uses a regex for version folders ^\d{4}\.\d{1,2}\.\d{1,2}-[a-f0-9]+$ that doesn’t account for the new timestamp format 2026.06.19-20-24-33-653a7fb, so a valid folder gets rejected. We’ve already filed this internally, but I can’t share an ETA for the fix yet.

Workarounds until the fix is shipped, pick one:

  • Edit the regex manually. Open both files %LOCALAPPDATA%\cursor-agent\cursor-agent.ps1 and %LOCALAPPDATA%\cursor-agent\agent.ps1, then change -[a-f0-9]+$ to -.+$ (your option ^\d{4}\.\d{1,2}\.\d{1,2}.*-[a-f0-9]+$ also works). It’s important to patch both files. Windows PowerShell uses one, and PowerShell 7 uses the other.
  • Or rename the version folder to remove the time segment versions\2026.06.19-20-24-33-653a7fbversions\2026.06.19-653a7fb.

Let us know if the workaround didn’t help.