Agents ignore rule to use Powershell commands and default to Linux

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I’ve set this persistent rule:
“Always use PowerShell commands and syntax when running terminal commands. The user is on Windows with PowerShell as their default shell.”

But agents still default to Linux/macOS commands:
Example: curl -s “https://api.github.com/user/repos?per_page=100

when it should generate the PowerShell equivalent:
Invoke-RestMethod “https://api.github.com/user/repos?per_page=100

This happens across agents and sessions, also with the same agent/session

Ask:
Please fix this so agents consistently respect the rules around terminals, or provide a way to enforce it globally.

Steps to Reproduce

Use Cursor on Windows. Agents Claude or GPT

Expected Behavior

Use system terminal commands

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.5.11 (user setup)
VSCode Version: 1.99.3
Commit: 2f2737de9aa376933d975ae30290447c910fdf40
Date: 2025-09-05T03:48:32.332Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

Sonnet 4, GPT-5

Does this stop you from using Cursor

No - Cursor works, but with this issue

Thanks for the report! This exact issue has been fixed in Cursor 1.7!

You’re currently on version 1.5.11, and version 1.7 (released September 29, 2025) specifically addresses PowerShell handling on Windows. From the official changelog:

“On Windows, Agent now correctly uses PowerShell. On macOS and Linux, PowerShell will be used if it’s set as your default shell. Agent also properly detects the shell, preventing Bash-specific syntax errors in PowerShell.”

To fix your issue:

  1. Update to Cursor 1.7 or later (Cursor menu → Check for Updates)

  2. Once updated, Agents should automatically detect your Windows environment and use PowerShell syntax without needing the manual rule

Let us know if you still see issues after updating to 1.7!

1 Like

Based on the timing, it would appear that this “fix” in 1.7, broke Cursor for people using Windows with WSL who rely on the agent using Bash as described in this issue:

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.