Agent shell broken after update — PowerShell wrapper script parsing error

Hey, thanks for the report. This looks like a new regression in the PowerShell wrapper script after the 2.4.37 update. There’s a similar bug here Bug Report: PowerShell Commands Fail with “Duplicate Key” Error in Wrapper Script where the wrapper script also fails during processing.

Try this workaround:

  1. Cursor Settings Ctrl+Shift+J
  2. Agents > Legacy Terminal Tool > enable it
  3. Ctrl+Shift+P > Terminal: Kill All Terminals
  4. Fully restart Cursor
  5. Try the command again

Legacy Terminal Tool uses the older implementation, which can avoid the bug in the new wrapper script.

If that doesn’t help, I’ll need a bit more info to escalate this to the team:

  • Can you share the contents of the failing ps-script file? (It’s in C:\Users\User\AppData\Local\Temp\ps-script-*.ps1, grab the most recent one)
  • What exact command was the agent trying to run when the error showed up?

Let me know how it goes.