Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
In Agent mode, Cursor completely ignores the terminal.integrated.automationProfile.windows setting (which is configured to use cmd.exe) and forces the generation of temporary PowerShell scripts (ps-script-*.ps1) in the %TEMP% directory to execute commands.
Because I am on a corporate machine with strict enterprise endpoint protection and privilege management tools, these auto-generated, hidden .ps1 scripts are immediately flagged and blocked as unapproved executables or potential malware behavior. The Agent then gets stuck in a loop or fails entirely.
Steps to Reproduce
Be on a Windows machine with strict enterprise endpoint protection (e.g., EDR, AppLocker, Privilege Management software, WDAC).
Set the following in settings.json to force Command Prompt:
JSON
“terminal.integrated.defaultProfile.windows”: “Command Prompt”,
“terminal.integrated.automationProfile.windows”: {
“path”: “C:\Windows\System32\cmd.exe”
}
Attempt to run any terminal command using the AI Agent.
Observe that the Agent ignores cmd.exe and attempts to execute a ps-script-xxx.ps1 file via powershell.exe.
Observe the execution block or “Unapproved Executable” popup from the enterprise security software.
Expected Behavior
When terminal.integrated.automationProfile.windows is set to cmd.exe, the Agent should respect this setting and execute commands natively in Command Prompt without wrapping them in temporary PowerShell scripts.
Operating System
Windows 10/11
Version Information
Version: 2.6.11 (user setup)
VSCode Version: 1.105.1
Commit: 8c95649f251a168cc4bb34c89531fae7db4bd990
Date: 2026-03-03T18:57:48.001Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200
Additional Information
Yes - Agent mode is practically unusable for terminal automation. I am currently forced to use Ask mode and manually copy/paste commands into my own terminal to bypass the PowerShell script generation.
Failed Workarounds Attempted:
-
Toggling Legacy Terminal Tool ON.
-
Toggling Auto-run in Sandbox OFF.
-
Disabling HTTP/2.
-
None of these stop the Agent from defaulting to PowerShell script generation.
Does this stop you from using Cursor
Yes - Cursor is unusable