Terminal not working in agent mode

Hi there! :slight_smile:

I’m encountering an issue with using WSL2 as my terminal in Cursor’s agent mode. It was working perfectly fine previously, but now it seems to be broken.

Problem Summary:

When I try to open a terminal with my Debian (WSL) profile in agent mode, Cursor seems to be executing wsl -l instead of wsl -d Debian. This results in the terminal listing my WSL distributions instead of launching the Debian shell as expected.

Detailed Observations:

  1. Incorrect Terminal Output: As you can see in the screenshot below, the terminal header displays “docker-desktop” and “Debian”. However, the terminal output is actually the result of wsl -l, listing my WSL distributions (though “Debian” itself is cut off because it exceeds the output). This indicates it’s not launching the Debian shell correctly.

  2. Command Line Evidence: This is further confirmed by the second screenshot. It clearly shows Cursor attempting to execute wsl -l instead of the expected wsl -d Debian command for the Debian profile.

  3. wsl -l vs wsl -d Debian: For clarity, wsl -l is designed to list all available WSL distributions, while wsl -d Debian is the command to specifically launch a shell within the Debian WSL distribution. Cursor is incorrectly using the listing command.

  4. Manual Profile Works: Crucially, when I manually open a terminal using the “Debian (WSL)” profile within Cursor, it works flawlessly! This proves that the Debian WSL itself is correctly configured and accessible within Cursor profiles.

  5. Git Bash Issue Too: This issue isn’t isolated to just the Debian WSL profile. I’m experiencing the same problem with Git Bash terminals in agent mode. It also seems to be incorrectly adding the -l argument to the command line. This suggests a potential broader problem with how Cursor is handling terminal commands in agent mode.

My Cursor Terminal Settings:

Here are my current terminal settings for the Debian (WSL) profile, in case they are relevant:

Any assistance in resolving this would be greatly appreciated! Thank you very much for your help.

Hi there,
I have the same issue, did another post for it… if you get a solution. let me know!

I have this same issue. I am using Ubuntu with WSL but it is opening the docker-desktop WSL instance even though the configuration is pointing to Ubuntu.

Same problem here.

I found a way!

It works well when you run Cursor remotely in WSL, instead of running it in Windows and using WSL as the terminal only.

All you have to do is click here:

have fun! :slight_smile:

Bro should be happy because who does not automatically run the Terminal commands at its disposal, if you let anyone have the right to run in the Terminal, bro you will not know what will happen to your project. Ideally, who should only suggest Command and User will be the one. Do not allow anyone to perform the command itself.