Agent can't use the terminal

Hi,

The terminal at the bottom of the ide works perfectly fine, but when Cursor tries to run commands, it doesn’t work.

At first I would get weird errors like:

cursor “C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe ‘-l’” terminated with exit code: 1.

I tried changing terminal.integrated.defaultProfile.windows to “Ubuntu (WSL)” but now when the Agent tries to run a command, it either returns just “Ubuntu” or it returns
Windows Subsystem for Linux Distributions:docker-desktop (Default)Ubuntu

Like, I wold ask it to test something in the terminal, the agent would try to run echo “Hello, this is a test command” and it would get the above as output!
I don’t understand why the terminal works fine for me, but the agent can’s use it.
Here is my full settings.json:

{
“terminal.integrated.commandsToSkipShell”: [
“language-julia.interrupt”
],
“julia.symbolCacheDownload”: true,
“julia.enableTelemetry”: true,
“editor.lightbulb.enabled”: “off”,
“files.eol”: “\n”,
“editor.formatOnPaste”: true,
“julia.enableCrashReporter”: true,
“notebook.output.scrolling”: true,
“julia.NumThreads”: 16,
“breadcrumbs.enabled”: false,
“notebook.lineNumbers”: “on”,
“http.proxyAuthorization”: null,
“http.proxySupport”: “fallback”,
“python.defaultInterpreterPath”: “C:\Users\mares\anaconda3\envs\tf\python.exe”,
“terminal.integrated.profiles.windows”: {
“PowerShell”: {
“source”: “PowerShell”,
“icon”: “terminal-powershell”
},
“Command Prompt”: {
“path”: [
“${env:windir}\Sysnative\cmd.exe”,
“${env:windir}\System32\cmd.exe”
],
“args”: ,
“icon”: “terminal-cmd”
},
“Git Bash”: {
“source”: “Git Bash”
},
“Ubuntu (WSL)”: {
“path”: “C:\Windows\System32\wsl.exe”,
“args”: [
“-d”,
“Ubuntu”
]
}
},
“terminal.integrated.defaultProfile.windows”: “Ubuntu (WSL)”,
“remote.autoForwardPortsSource”: “hybrid”,
“[markdown]”: {
“diffEditor.ignoreTrimWhitespace”: true
}
}

I tried different permutations of the “args” under “Ubuntu (WSL)” but it didn’t change anything…

1 Like

Bump as I’m also having this issue. If default terminal is set to WSL, agent basically gets stuck/frozen when trying to start a terminal. If you ask it why it gets stuck, it’s not sure but notes that it sees docker-desktop in the output. If you try to pop out the frozen terminal, it does not properly display, and it is then impossible to kill without restarting Cursor.

Same problem here I have cursor installed on three different devices and only in one has this problem.

If I copy and paste the command into the terminal it actually works, still is annoying to have to do this. I’ve tried on installing and installing again with admin rights etc but didn’t work.