Agent completely ignores automationProfile

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

1 Like

Hey, thanks for the detailed report. This is a known issue. On Windows, the agent hardcodes PowerShell to run commands and ignores automationProfile.windows, even when it’s set to cmd.exe. This hits especially hard in corporate environments with WDAC or AppLocker.

The Legacy Terminal Tool used to help as a workaround, but I see you already tried it and it didn’t work.

I’ve passed your report to the team. There’s no timeline yet, but your case helps with prioritization.

For now, the only workaround I can suggest is to keep using Ask mode and manually copy commands, like you’re doing. I know that’s really inconvenient.

Let me know if anything changes on your side.

2 Likes

Same as in Linux, it won’t recognize the automatedProfile. Please check.