When the Agent mode executes a command in the Terminal, it often stops automatically!

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

When the Agent mode calls the Terminal to execute a command, it automatically prepends ‘q’ or ‘q^C’ to the command, causing the command to fail execution.
This issue occurs when using either PowerShell or Git Bash for the Terminal program.
This problem has persisted across multiple versions, starting from Cursor 1.7.* up to the current 2.1.*

Steps to Reproduce

This issue occurs intermittently (irregularly) when the Agent mode calls the Terminal to execute a command, but the overall frequency of occurrence is very high.

Expected Behavior

The command executed normally.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version: 2.1.32 (system setup)
VSCode Version: 1.105.1
Commit: ef979b1b43d85eee2a274c25fd62d5502006e420
Date: 2025-11-25T05:00:12.749Z
Electron: 37.7.0
Chromium: 138.0.7204.251
Node.js: 22.20.0
V8: 13.8.258.32-electron.0
OS: Windows_NT x64 10.0.17763

For AI issues: which model did you use?

Specified Model or Auto

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

Hey, thanks for the report. This looks related to known issues with the Agent’s terminal implementation on Windows.

Please try this workaround:

  • Open Cursor Settings Ctrl+Shift+J → Agents → Inline Editing & Terminal
  • Enable “Legacy Terminal Tool”
  • Press Ctrl+Shift+P → “Terminal: Kill All Terminals”
  • Fully restart Cursor

If the issue persists, please share:

  • Help → Toggle Developer Tools → Console tab (are there any errors when the extra “q” appears?)
  • Does this happen in both PowerShell and Git Bash, or only in one of them?

This will help the engineering team find the root cause.

This does work, but I’m puzzled by it. A few days ago, it worked perfectly with PowerShell. Then, after the update, it stopped working. I hope you can avoid this situation during the update process.

Thanks for confirming that the Legacy Terminal Tool workaround works! I understand your concern about the regression after updates.

The team is aware that the new terminal implementation on Windows has ongoing issues affecting multiple users. I’m escalating this specific ‘q’ prepending bug to engineering because:

  • It’s a regression that appeared after updates (worked in earlier versions)
  • It consistently affects both PowerShell and Git Bash
  • The Legacy Terminal Tool workaround confirms it’s specifically the new implementation

For now, please keep the Legacy Terminal Tool enabled. The engineering team will work on making the new terminal implementation stable for Windows so you won’t need this workaround in future updates.

Thanks for the detailed report and your patience!