[Windows] Agent terminal tool: no captured output (~0ms, exit 0) — integrated CMD works; Legacy Terminal enabled; PowerShell blocked by policy

Shell and Python work when I run them manually in Cursor’s integrated CMD, but the Agent’s run-terminal-command tool does not return usable stdout/stderr (often empty output, ~0 ms, exit 0). Agent-driven Python and scripts are therefore unreliable even though the integrated terminal is fine. Enabling Legacy Terminal Tool does not fix it. This machine also cannot use PowerShell due to policy. I would like to know if that could be related and whether cmd.exe can be forced for Agent runs.

Product / feature: Cursor IDE — Agent / Composer terminal command execution (shell commands invoked by the agent).

What works vs what fails:

Integrated terminal (manual, CMD): Normal output for echo, where python, python --version, python -c “print(‘ok’)”.

Agent terminal tool: Empty stdout/stderr, ~0 ms, exit 0. In one check, a workspace probe file write also did not appear despite exit 0, which suggests silent failure or broken capture, not a missing Python install.

Legacy Terminal Tool: Enabled in settings, but no change — the issue persists.

Environment:

OS: Windows_NT x64 10.0.26100.

Workspace: local folder under D:…\REDACTED (full path omitted in this public post).

Integrated terminal: CMD; manual usage works.

PowerShell: Not usable on this machine (organizational / execution policy restrictions). I am not claiming PowerShell is the proven root cause — I am asking Cursor to confirm whether Agent tooling depends on PowerShell on Windows and whether cmd.exe can be selected instead.

Legacy Terminal Tool: Enabled under Settings → Chat → Inline Editing & Terminal. The problem still reproduces: empty agent capture, ~0ms, exit 0.

Cursor version:
Version: 2.6.22 (system setup)
VSCode Version: 1.105.1
Commit: c6285feaba0ad62603f7c22e72f0a170dc8415a0
Date: 2026-03-27T15:59:31.561Z
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26100

Additional context — PowerShell disabled by policy:

Does the Agent terminal pipeline on Windows require PowerShell, directly or indirectly? If Agent runs always try to spawn PowerShell and it is blocked by policy, could that produce empty stdout/stderr, ~0 ms, and exit 0 while integrated CMD still works?

If PowerShell is required today, is there a supported setting to force Agent or automation terminal to cmd.exe (for example default profile, terminal.integrated.automationProfile.windows, or another official option)? If not, please document the dependency or add a fallback when PowerShell is unavailable.

Steps to reproduce:

  1. Open the workspace (path redacted here).

  2. In integrated CMD, run echo test, then python --version, then python -c “print(‘ok’)” — output appears (see log below).

  3. In Agent chat, ask the agent to run the same commands via the terminal tool.

  4. Observe: integrated terminal is OK; the agent tool shows empty output, ~0ms, exit 0, with Legacy Terminal enabled.

Expected behavior: The agent terminal tool should return the same stdout/stderr and realistic timing as the integrated terminal, with correct exit codes when commands fail.

Actual behavior (agent tool, observed): I attempted something like: cd /d “D:…\REDACTED” && echo AGENT_PROBE_1 && python --version && python -c “print(‘agent-probe-ok’)” (cwd redacted). The pattern was: exit code 0, empty stdout/stderr, ~0 ms, which is not plausible for shell plus Python. A follow-up PowerShell WriteAllText probe to a file such as _agent_tool_probe.txt under the workspace also reported exit 0 and empty capture, but the file was not present afterward.

Hi there!

We detected that this may be a bug report, so we’ve moved your post to the Bug Reports category.

To help us investigate and fix this faster, could you edit your original post to include the details from the template below?

Bug Report Template - Click to expand

Where does the bug appear (feature/product)?

  • Cursor IDE
  • Cursor CLI
  • Background Agent (GitHub, Slack, Web, Linear)
  • BugBot
  • Somewhere else…

Describe the Bug
A clear and concise description of what the bug is.


Steps to Reproduce
How can you reproduce this bug? We have a much better chance at fixing issues if we can reproduce them!


Expected Behavior
What is meant to happen here that isn’t working correctly?


Screenshots / Screen Recordings
If applicable, attach images or videos (.jpg, .png, .gif, .mp4, .mov)


Operating System

  • Windows 10/11
  • MacOS
  • Linux

Version Information

  • For Cursor IDE: Menu → About Cursor → Copy
  • For Cursor CLI: Run agent about in your terminal
IDE:
Version: 2.xx.x
VSCode Version: 1.105.1
Commit: ......

CLI:
CLI Version 2026.01.17-d239e66

For AI issues: which model did you use?
Model name (e.g., Sonnet 4, Tab…)


For AI issues: add Request ID with privacy disabled
Request ID: f9a7046a-279b-47e5-ab48-6e8dc12daba1
For Background Agent issues, also post the ID: bc-…


Additional Information
Add any other context about the problem here.


Does this stop you from using Cursor?

  • Yes - Cursor is unusable
  • Sometimes - I can sometimes use Cursor
  • No - Cursor works, but with this issue

The more details you provide, the easier it is for us to reproduce and fix the issue. Thanks!

Where does the bug appear (feature/product)?

Cursor IDE


Describe the Bug

On Windows, shell and Python work when I run them manually in Cursor’s integrated CMD, but the Agent’s run-terminal-command tool does not return usable stdout/stderr. Typical pattern: empty output, ~0 ms duration, exit code 0, even when a command should print text or when a file write should leave a file on disk (probe file did not appear). This makes agent-driven Python/scripts and CLI verification unreliable. Legacy Terminal Tool is enabled but does not fix the issue. This machine cannot use PowerShell due to organizational/policy restrictions; I am asking whether the Agent pipeline depends on PowerShell and whether cmd.exe can be forced for Agent runs.


Steps to Reproduce

  1. Open a local workspace

  2. In integrated CMD, run: echo test, then python --version, then python -c “print(‘ok’)”. Confirm normal output.

  3. Start an Agent chat and ask the Agent to run the same commands via the terminal tool.

  4. Observe the tool result: empty capture, ~0 ms, exit 0, while integrated CMD still shows correct output. Legacy Terminal Tool is enabled; behavior unchanged.


Expected Behavior

The Agent terminal tool should return the same stdout/stderr and realistic timing as the integrated terminal for the same cwd and commands, with correct non-zero exit codes when commands fail.


Screenshots / Screen Recordings

(Optional) I can attach a screenshot of the Agent tool panel showing empty output next to integrated terminal output if needed — not attached in this edit yet.
Operating System

Windows 11

Version Information
Version: 2.6.22 (system setup)
VSCode Version: 1.105.1
Commit: c6285feaba0ad62603f7c22e72f0a170dc8415a0
Date: 2026-03-27T15:59:31.561Z
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?
Auto/Composer2

Additional Information

Integrated terminal profile: CMD (works for manual commands).

PowerShell is not usable on this machine due to policy. Question: does Agent terminal execution on Windows require PowerShell? If so, could policy-blocked PowerShell explain empty output / ~0ms / exit 0 while integrated CMD works? Is there a supported way to force Agent/automation shell to cmd.exe (e.g. terminal.integrated.automationProfile.windows)?
Legacy Terminal Tool: Enabled (Settings → Chat → Inline Editing & Terminal) — issue persists.

Evidence — integrated CMD
D:…\REDACTED>echo hello-from-external-cmd hello-from-external-cmd

D:…\REDACTED>where python D:…\python3.13\python.exe C:\Users\AppData\Local\Microsoft\WindowsApps\python.exe

D:…\REDACTED>python --version Python 3.13.5

D:…\REDACTED>python -c “print(‘ok’)” ok

Hey, thanks for the detailed report. This is a known bug. On Windows, the agent terminal tool is hardcoded to use PowerShell no matter what terminal profile you set. Since PowerShell is blocked by policy on your machine, the process starts, gets killed right away, and returns empty output with exit 0 and about 0 ms. That matches what you are seeing.

The terminal.integrated.automationProfile.windows and defaultProfile.windows settings are currently ignored by the agent. Legacy Terminal Tool does not help here either.

Workaround: add this to your .cursor/rules file. Create it in your project root if it does not exist.

When running terminal commands, always use cmd.exe syntax, not PowerShell. The default shell is Command Prompt. Never use PowerShell-specific commands or scripts.

This tells the model to generate cmd compatible commands. It will not change which shell the agent starts, but it can reduce failures from PowerShell only syntax. Since PowerShell is fully blocked on your machine, this might not fully fix it because the shell process itself still fails.

The team knows about this. There is no ETA yet, but your report, especially the PowerShell blocked by policy detail, helps with prioritizing it.

Let me know if the rules workaround makes any difference.

I used these rules, but they didn’t work for me.

I run it in my CMD, and it works fine.

Hey, I can see the screenshots. The agent is generating cmd syntax, but the output is still empty. Unfortunately, that’s expected. Rules only affect what command syntax the model generates, but they don’t change the shell the agent runs commands in. On Windows, the agent always runs PowerShell internally, no matter what settings you use.

If PowerShell is blocked by policy, the process exits immediately with exit 0 and empty output, which is exactly what you’re seeing. A Rules workaround won’t help here.

Right now there isn’t a real workaround for a fully blocked PowerShell. The team is aware of the issue. I’ll update the thread when there’s news.

When the agent runs commands in the project workspace (including trivial ones such as echo hello), the tool returns empty stdout/stderr, often with exit code 0 and ~0 ms elapsed time. That makes it impossible for the agent to show “complete terminal output” or to reliably infer success/failure from real command results.

Important observation: In the same scenario, Codex does not exhibit this problem—output and behavior look normal there. That suggests the root cause may not be “PowerShell vs cmd” alone, and is worth treating as a high-signal bug in Cursor’s command execution or output capture layer rather than dismissing it as shell configuration.


Questions:

Are there workarounds or alternative execution paths you recommend (e.g. different shell integration, settings, or diagnostics) while this is investigated?
Is there a plan to raise priority for this class of bugs, given it breaks a core agent workflow (run command → read output → iterate)?
Is there a target fix version or rough timeline you can share?
Environment (issue still reproduces on this build):

Cursor: 3.0.16 (system setup)
VS Code base: 1.105.1
Commit: 475871d112608994deb2e3065dfb7c6b0baa0c50
Date: 2026-04-09T05:33:51.767Z
Layout: editor
Build type: Stable
Release track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Hey, I see the update. A couple of things:

From the screenshot, it’s interesting that echo LEGACY_TEST did return the output “LEGACY_TEST”. That’s different from the previous behavior where the output was completely empty. But the exit code from cmd /c exit 55 is incorrect too, the shell wrapper returned 1 instead of 55, and that’s also a problem.

The Codex note is helpful and matches what we’re seeing. The issue is in Cursor’s output capture layer, not in the shell config itself.

Unfortunately, there’s no working workaround for locked-down PowerShell right now. The team is aware of the issue. There’s no ETA yet, but your report, especially the Codex comparison and the exit code details, helps with prioritization.

I’ll update the thread when there’s progress.