[Windows] Agent still uses PowerShell 5.1 despite PS7 default (still on Cursor 3.14.27)

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

On Windows, Cursor Agent Shell still launches Windows PowerShell 5.1 (C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe) even when the integrated terminal default profile and automationProfile are configured to PowerShell 7 (pwsh).

Integrated terminal correctly uses PS7. Agent Shell does not respect terminal.integrated.defaultProfile.windows / terminal.integrated.automationProfile.windows.

This matches previously acknowledged known bugs (threads closed; still reproducible on Cursor 3.14.27).

Steps to Reproduce

  1. Install PowerShell 7 (Microsoft Store / WindowsApps build is enough to reproduce).
  2. Set Cursor User settings so default + automation profiles point to pwsh, e.g. %LOCALAPPDATA%\Microsoft\WindowsApps\pwsh.exe.
  3. Open a new integrated terminal and run $PSVersionTable.PSVersion → shows 7.x.
  4. Ask Agent: Run $PSVersionTable.PSVersion (or inspect Agent Shell process path).
  5. Observe Agent reports 5.1.26100.x and path ...\WindowsPowerShell\v1.0\powershell.exe.

Expected Behavior

Agent Shell should use the same PowerShell 7 configured as the IDE default / automation profile, instead of hard-falling back to Windows PowerShell 5.1.

Operating System

Windows 10/11

Version Information

Version: 3.14.27
Commit: 047548b00c1a079373d74d00183f32510a4a41e0
Date: 2026-08-04T03:29:11.183Z
Build Type: Stable
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

Composer / Auto (Agent Shell tool)

Additional Information

Related closed reports (staff already acknowledged known bug):

Also older report topic id 149519 (“Cursor keeps using old Microsoft PowerShell”).

Local evidence (2026-08-06):

  • Agent Shell: PSVersion 5.1.26100.8875 at C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
  • pwsh 7.6.4 available via Store/WindowsApps alias
  • Even after fixing terminal.integrated default+automationProfile to pwsh, Agent still starts powershell.exe directly.

Please keep product tracking open until Agent honors terminal.integrated.* or exposes an explicit Agent shell setting.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report and for pulling the previous threads together. You’re right: Agent Shell is a separate persistent session, and right now it doesn’t read terminal.integrated.defaultProfile.windows or automationProfile.windows. Instead, it detects the shell itself: it picks pwsh from PATH if it finds it, otherwise it falls back to Windows PowerShell 5.1. We’re tracking this and there’s an internal product item for it, but I can’t share an ETA yet.

The key detail in your case is that PowerShell 7.6.4 is installed via the Microsoft Store as a WindowsApps alias at %LOCALAPPDATA%\Microsoft\WindowsApps\pwsh.exe. The agent’s PATH scan doesn’t pick up that alias, so it falls back to 5.1.

A working workaround that helped a user with the same setup in thread 162813:

  • Remove the Store version of PowerShell 7.
  • Install pwsh via MSI or winget: winget install Microsoft.PowerShell.
  • Confirm pwsh.exe resolves from PATH. Open a new terminal and run where.exe pwsh. The path should point to the MSI install, not WindowsApps.
  • Fully restart Cursor. Don’t use Reload Window. Close it and open it again, since the detection result is cached for the lifetime of the extension host.

After that, Agent Shell should pick up PowerShell 7. Let me know how it goes.