Check the folder using a normal Windows PowerShell outside Agent Shell:
Test-Path "C:\CursorAgentTest\probe.txt"
The result is: False
The file is not created, even though the Agent Shell reports exit code 0.
The same commands work normally when executed manually in a regular PowerShell terminal.
The issue reproduces in a clean, empty workspace and does not depend on a project repository, Git configuration, project rules, or project source code.
Hey, thanks for the detailed report and the clean repro. What you’re describing, Agent Shell reports exit 0 but the command doesn’t actually run, is a Windows issue we’re tracking. It shouldn’t happen, and it’s not related to your project.
A couple things to try:
In Cursor Settings > Agents, switch Run Mode to a different option and back (for example, to Use Allowlist, then back to Auto-review). Then fully quit Cursor (not Reload Window, a full quit) and open it again. Sometimes a saved value can still affect the agent terminal even if you can’t see it in the UI.
You currently have Legacy Terminal Tool ON. Try turning it OFF instead, fully restart Cursor, and re-run the test. The default terminal path changed a lot, and checking whether behavior changes with Legacy OFF will help narrow this down.
If it still reproduces after both steps, can you share:
Your PowerShell version ($PSVersionTable.PSVersion in a normal terminal)
Whether a terminal shows up in the Cursor panel when the agent runs the command, and whether you can see the command text in it
The Request ID from a failed run (hover the agent message, menu ... > Copy Request ID)
That’ll show where exactly the command is getting lost. Let me know how it goes.
Thanks, that log signature LocalShellStreamExecutor → ShellCoreExecutor → NaiveTerminalExecutor, without PTY or output capture, is exactly what helps narrow this down. It looks like the command is getting to execution (the exit code is correct), but the stdout capture path isn’t being attached. This is a Windows-specific issue we’re tracking, and it’s not related to your project.
A few quick questions to pinpoint it more precisely:
In #7 the exit codes are correct now. Are side effects happening too? For example, if you run Set-Content -LiteralPath "C:\CursorAgentTest\probe.txt" -Value "TEST" via Agent Shell, does the file actually get created (with stdout still empty), or is the file still not there? This helps distinguish output not being captured vs the command not executing.
PowerShell version. Run this in a normal terminal:
$PSVersionTable.PSVersion
The Request ID from a failed run. Hover the agent message, open the ... menu, then Copy Request ID.
With these three items, we’ll be able to see exactly at which step the output is getting lost. I’ll reply here when there’s an update.