Experiencing consistent PowerShell integration issues in Cursor AI. Any terminal command execution results in cursor positioning errors.
Core Issue
All terminal commands fail with PowerShell cursor positioning errors
Issue appears to be with PowerShell’s terminal rendering
Affects all command execution attempts regardless of the command type
Error Pattern
Consistently getting the same PowerShell error:
System.InvalidOperationException: Cannot locate the offset in the rendered text that was pointed by the original cursor.
Initial Coord: (44, 12) Buffer: (164, 13) Cursor: (45, 9)
at Microsoft.PowerShell.PSConsoleReadLine.RecomputeInitialCoords(Boolean isTextBufferUnchanged)
Context
Issue occurs in Cursor’s AI interface
Using the run_terminal_cmd tool
PowerShell seems to be intercepting all terminal interactions
No actual command output is being received
Expected Behavior
Terminal commands should execute normally
Should receive command output rather than PowerShell errors
Terminal integration should work with both PowerShell and zsh
Questions
Is this a known issue with PowerShell integration in Cursor?
Are there specific settings needed for terminal integration?
Is there a recommended workaround for this PowerShell rendering issue?
Should terminal integration be configured differently?
Additional Information
The error suggests a fundamental issue with PowerShell’s cursor positioning and terminal rendering in the AI environment, rather than with specific commands.
Steps to Reproduce
Use Cursor AI
Attempt to execute any terminal command
Observe PowerShell cursor positioning errors instead of command output
Would appreciate guidance on resolving this PowerShell integration issue.
I have now migrated to PowerShell 7.5 via this link and all my problems are solved - including it set Windows Update as integrated the Powershell releases into its duties.
This issue is really frustrating, because it makes Cursor IDE much less useful.
I have many tools installed through my powershell profile, so changing "terminal.integrated.defaultProfile.osx": "zsh" means those tools aren’t set up right, and it’s annoying needing to manually switch my terminal to pwsh. And Cursor wouldn’t be able to help me with powershell live scripting.
I thought there would be the same bug in vscode, but their Agent mode runs things in the normal Terminal window, so this bug is just in how Cursor creates/resizes the Chat dynamic terminal!
It seems that Powershell 7.5 is working better for me, too, on Windows (obviously). It SEEMS to be seeing the command is over and getting the output. I had to install PS 7.5, add it to the cursor integrated editors and also restart cursor. That last was important.
Some commands run in the chat, and either they stay there or I do the “Open in Terminal” so get a full pane outside the chat. Both seem to be working. I ran all my linter runs, builds and test case execution both in the chat and in the external(ish) terminal pane. All seemed to work. I’d recommend trying this out if you’re having issues.
EDIT: Okay – it’s BETTER, but still sometimes hangs. Not as much, though.
Yeah, I’m wrong. It still ■■■■■ majorly. Restarting the app seems to help, but only for a short time. I don’t understand why, honestly, the cursor team isn’t fixing this? I’ve tried just about every shell I can think of, they all have the problem. This is honestly becoming tiresome. Like… sure, I can spend my monthly money (of which it says I’m at 2%, so clearly I’m not a burdensome user), but if I can’t use it, then my money is pretty much wasted. Old boss is trying to convince me to go to Claude Code.