Agent can't execute commands on a remote host any more, it got stuck

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I am using Cursor 2.3.41. I use remote SSH extension to connect to my remote host. I was able to talk to Agent and ask him to run various shell commands but at some moment it got stuck , looks like request is pending and is not finishing. How to reset it? I tried many different things like Cursor restart, removal stopping all cursor processes on remote host, removing .cursor-server and .cursor folders on a remote host. Nothing worked.
When I create new workspace and start new ssh connection to the same host, the agent can run terminal commands. I don’t want to lose my chat history that is I would like to keep using my current workspace. Besides, I don’t want to recreate new workspace every day due to this issue. How to resolve?
I am using 3 folders included/imported into my workspace.

Steps to Reproduce

  1. Use Remote SSH extension to connect to remote host
  2. Work with Agent , ask him to run different commands , give him different tasks related with the files located on remote host
  3. At some point in time it will got stuck, it may take a 1 day or longer. Not sure how to reproduce it.

Expected Behavior

Agent is able to be restarted and we can resent the connection to make agent been able to run cli commands on a remote host again.

Screenshots / Screen Recordings

Operating System

Windows 10/11

Version Information

Version: 2.3.41 (user setup)
VSCode Version: 1.105.1
Commit: 2ca326e0d1ce10956aea33d54c0e2d8c13c58a30
Date: 2026-01-16T19:14:00.150Z
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.22631

For AI issues: which model did you use?

all models

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

1 Like

I noticed this happens when one of the commands fails. I switched to legacy terminal, I started a new workspace and I run couple of prompts , then I got this:

”Auto-Ran command: tail| grep”
then next one:
”Cancelled command: tail”

but I am pretty sure I haven’t pressed cancel myself.

Still investigating but is it possible this may have something to do with grep and the fact it returns exit code 1 on a mismatch? With exit code 1 all goes ‘ka-boom’ ?

Hey, thanks for the report. Nice catch about grep and exit code 1, that could be an important trigger.

Try enabling Legacy Terminal Tool as a workaround:

  • Cursor Settings CTRL + Shift + J > Agents > Inline Editing & Terminal > turn on Legacy Terminal Tool
  • CTRL + Shift + P > Terminal: Kill All Terminals
  • Fully restart Cursor

If that doesn’t help, or if it happens again, we’ll need a few details:

  • The Request ID from the stuck command (top-right of the chat > Copy Request ID)
  • The exact command that got stuck
  • Logs from Help > Toggle Developer Tools > Console (a screenshot of any errors helps)

Your note about seeing “Auto-Ran command: tail| grep” and then “Cancelled command: tail” is really helpful. It looks like a bug in how failed commands are handled. Let me know if Legacy Terminal fixes it or if it keeps happening.

Right now my Cursor got a downgrade (via automatic updates) to a lower version: 2.4.21. Hence the environment I have now is different. I am reverting back to Legacy mode, I will observer and let you know. Please keep investigating on the issue as the Agent using and running commands in terminal seems not reliable at all and it is affecting not only my productivity but all users who uses the Cursor app and pay quite big money for it every month. Hence the expectation is to have this fixed.. And I fully udnerstand the frustration of other people, because when this happens and Cursor hungs on the command in the chat.. then this just stopped working and we are not having the functionality we paid for any more.

1 Like

Any update on this one?

same problem

Hi @deanrie , @all,

Again, any update on this issue?

Another question, I see Cursor is getting updates almost every day, where can I find release notes for each release?

Hey, let’s go step by step:

On the main issue:

I see you tried Legacy Terminal after my last reply, but you didn’t say if it helped or not. Can you confirm:

  1. Is the Legacy Terminal Tool still enabled? (Cursor Settings > Agents > Legacy Terminal Tool)
  2. Did the issue happen again after switching?
  3. If yes, I’ll need details from the last time it froze:
    • Request ID (top right of the chat > Copy Request ID)
    • A screenshot of the Console with errors (Help > Toggle Developer Tools > Console)
    • The exact command it got stuck on

Your theory about grep returning exit code 1 is interesting, it really could be a trigger. The command is logged, but without the details above it’s hard to dig further.

On release notes:

There aren’t any official public release notes. There is a changelog at Changelog · Cursor

Let me know how it goes with Legacy Terminal, that’ll help narrow this down.

With legacy terminal all is good now, but I don’t know whether I can switch to ‘new’ terminal now, is this fixed already?

Glad Legacy Terminal helped. That’s exactly what we needed.

About switching back, I don’t know if the bug in the new terminal has been fixed yet. If Legacy Terminal is stable for you, I’d recommend staying on it for now. You can test the new terminal, but if it starts freezing again, switch back to Legacy right away.

If you try the new terminal and see the freezing again, please share:

  • Request ID (top-right of the chat > Copy Request ID)
  • Console logs (Help > Toggle Developer Tools > Console), screenshot with any errors
  • The command it stuck on

Let me know if anything comes up.

Thanks , I will stay with Legacy Terminal for a few weeks until the situation gets more stable. Where can we see the differences between Legacy and New? What are the advantages of using New Terminal?

About switching to the new terminal, I can’t confirm the bug is fully fixed. Since the Legacy Terminal is stable, it’s better to stick with it for now.

If you want to test the new terminal, you can try it, but switch back to Legacy at the first signs of freezing.

The new terminal was supposed to improve command output handling and agent integration, but based on forum reports, it still has stability issues, especially over remote SSH.