Installation Failed

Where does the bug appear (feature/product)?

Cursor CLI

Describe the Bug

PS C:\Users\calvi> irm ‘Cursor CLI — Run Agents in Terminal, GitHub Actions and Automations & Scripts’ | iex
Start using Cursor Agent:
agent

Happy coding! :rocket:

PS C:\Users\calvi> agent update
agent.ps1: No version directories found in C:\Users\calvi\AppData\Local\cursor-agent
PS C:\Users\calvi> agent
agent.ps1: No version directories found in C:\Users\calvi\AppData\Local\cursor-agent
PS C:\Users\calvi> agent
agent.ps1: No version directories found in C:\Users\calvi\AppData\Local\cursor-agent

Steps to Reproduce

  1. Run under powershell 7, PS C:\Users\calvi> irm ‘Cursor CLI — Run Agents in Terminal, GitHub Actions and Automations & Scripts’ | iex
  2. When installation complete, it tried to run agent update, but failed with error as shown..

Expected Behavior

Complete without issues.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 3.7.27 (user setup)
VS Code Extension API: 1.105.1
Commit: e48ee6102a199492b0c9964699bf011886708ba0
Date: 2026-06-10T01:46:16.942Z
Layout: glass
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
xterm.js: 6.1.0-beta.256
OS: Windows_NT x64 10.0.29599

PS C:\Users\calvi> agent about
agent.ps1: No version directories found in C:\Users\calvi\AppData\Local\cursor-agent
PS C:\Users\calvi>

For AI issues: which model did you use?

Not yet event start!

Does this stop you from using Cursor

Yes - Cursor is unusable

Similar to this issues: Agent.ps1 failed to launch (2026.06.11-03-15-00-241fc09)

Thanks, if additional info need, please let me know.

Hey, thanks for the detailed report. This is a known bug in the Windows launcher in Cursor CLI, same one as in the thread you linked. On Windows, the launch script doesn’t recognize the new folder name format with the version, so it throws No version directories found. The issue is reported, there’s no exact ETA for a fix yet.

For now, you can unblock yourself manually. Open the launcher file and tweak the version selection regex:

  • Open %LOCALAPPDATA%\cursor-agent\cursor-agent.ps1 and its copy agent.ps1 in the same folder in an editor.
  • Find the line around 48 with a regex like ^\d{4}\.\d{1,2}\.\d{1,2}-[a-f0-9]+$.
  • Replace the tail -[a-f0-9]+$ with -.+$ so it accepts the new time-based format. The full pattern should become ^\d{4}\.\d{1,2}\.\d{1,2}-.+$.
  • Save, then restart agent.

This should make the CLI start right away. Once the fix is out, I’ll reply in the thread. Let me know if the workaround doesn’t work.

excellent it works now.

bro just update, after change, profile for powershell 7 works,

but powershell 7.7.0 preview 2, and native powershell by windows is not..

Glad it worked in PowerShell 7. For the other shells, it’s the same issue, you just need to apply the fix to the second copy of the launcher.

In %LOCALAPPDATA%\cursor-agent\ there are two files: cursor-agent.ps1 and agent.ps1. In the screenshots from Windows PowerShell and PS 7.7.0 preview, the error comes from agent.ps1, which means the regex in that file is still the old one. Looks like only one of the files was edited.

Open agent.ps1 in the same folder, find the line around 48 with a regex like ^\d{4}\.\d{1,2}\.\d{1,2}-[a-f0-9]+$, and change the tail from -[a-f0-9]+$ to -.+$, so it becomes ^\d{4}\.\d{1,2}\.\d{1,2}-.+$. Save it and restart agent.

After that, it should work in all three shells. Let me know if it still crashes anywhere.

Request ID: f447af1b-5e57-48f6-8a76-e4dcca6b7b56
{“error”:“ERROR_UNAUTHORIZED”,“details”:{“title”:“Unauthorized request.”,“detail”:“User is unauthorized”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:,“analyticsMetadata”:{“actionRequired”:“login”}},“isExpected”:true}
Unauthorized request. User is unauthorized
zct: Unauthorized request. User is unauthorized
at Rw1 (vscode-file://vscode-app/c:/Users/wenxt029/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:35723:27230)
at kog (vscode-file://vscode-app/c:/Users/wenxt029/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:35723:26375)
at qw1 (vscode-file://vscode-app/c:/Users/wenxt029/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:35724:7469)
at Pog.run (vscode-file://vscode-app/c:/Users/wenxt029/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:35724:12367)
at async Ule.runAgentLoop (vscode-file://vscode-app/c:/Users/wenxt029/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:48124:2927)
at async M7g.streamFromAgentBackend (vscode-file://vscode-app/c:/Users/wenxt029/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:48195:12809)
at async M7g.getAgentStreamResponse (vscode-file://vscode-app/c:/Users/wenxt029/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:48195:21573)
at async sut.submitChatMaybeAbortCurrent (vscode-file://vscode-app/c:/Users/wenxt029/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:35854:1949)
at async to (vscode-file://vscode-app/c:/Users/wenxt029/AppData/Local/Programs/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:47078:33305)

How to fix this?

hi bro yes it is ok now seems a few files contains this issues and need same fix, now working!

Hey @Sathish_Kumar1, this is a different issue and it’s not related to the CLI thread. Your auth error means the backend sees your session as unauthorized actionRequired: "login" and is asking you to re-authenticate. Your account is fine, it’s likely a token issue or your system time is out of sync.

Try this in order:

  1. Fully sign out: Cursor Settings > Sign Out or Ctrl+Shift+P > Cursor: Sign Out.
  2. Log in again.
  3. If it still happens, check your system time. On Windows: Settings > Time & language > Date & time > turn on Set time automatically, then click Sync now. Even a couple hours of drift can trigger this.
  4. After re-auth, restart Cursor.

Let me know if that fixed it. If not, please start a separate thread so it doesn’t get mixed with the CLI issue above, and include the Request ID.

Hey, quick update on the bug: the regex fix in the launcher cursor-agent.ps1 / agent.ps1 has been fixed on our side and is rolling out. After you update, the fixed launcher won’t get reverted by auto-update anymore, so you don’t need to manually edit the regex.

How to update:

  • If agent still runs for you (older version still works), run agent update.
  • If any command fails with No version directories found, the launcher itself is broken, so agent update won’t work either. Reinstall the CLI, this will overwrite the launcher:
    irm 'https://cursor.com/install?win32=true' | iex
    

If it still fails with No version directories found after that, send the contents of the folder %LOCALAPPDATA%\cursor-agent\versions\ here (each subfolder name is the installed version). We can’t get the version from agent --version because the command fails at the same point. We’ll take a look at what’s wrong.