This bug you are referring to is an old one. This is a new bug that appeared just recently within the past few days.
If youâre using WSL and need this fixed thereâs 2 workarounds
-
Rename project directory and open cursor fresh on the new one
-
In a Windows terminal / PowerShell:
wslThen inside WSL:
rm -rf ~/.vscode-server logoutBack on Windows side:
wsl --shutdown
You then just reopen Cursor and the terminal should be working again(until the context/settings gets corrupt again)
Removing the VS Code Powershell extension resolved my problem.
Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
I ask cursor (Composer 1 but happens on all) to âShow me the ouput of pwdâ and it comes back with:
The terminal isnât returning command outputâonly the command text.
The terminal tool appears to have an issue capturing stdout. Should I try a different command or investigate further?
Iâve been having this issue for 2 days now, before, it used to be able to run my tests and keep working through fixes until they ran.
Request ID: 861b53f1-e589-4077-9574-edf8c17ccadd
I mentioned this in another post relating to the issue lots of users are having about needing to accept all changes, that issue is now resolved (enable external file editing) but this issue remains.
Steps to Reproduce
As cursor to show the output of pwd
Expected Behavior
It to return the command output
Screenshots / Screen Recordings
Operating System
Windows 10/11
Current Cursor Version (Menu â About Cursor â Copy)
Version: 2.1.50 (user setup)
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
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.26100
For AI issues: which model did you use?
Composer 1
For AI issues: add Request ID with privacy disabled
861b53f1-e589-4077-9574-edf8c17ccadd
Does this stop you from using Cursor
No - Cursor works, but with this issue
Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Agent Failed run any command
Steps to Reproduce
any command
Operating System
Windows 10/11
Current Cursor Version (Menu â About Cursor â Copy)
Version: 2.1.50 (user setup)
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
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.26200
Does this stop you from using Cursor
Yes - Cursor is unusable
me too
Where does the bug appear (feature/product)?
Cursor IDE: AI Pane
Describe the Bug
Any agent failes to run any command; before: showed sth like âyour message is too longâ in new agent chats with only about 8 lines of prompt input; also asked for âacceptâ at each new code input during the chat.
BUT: ACCESSING THE SAME WORKSPACE FROM DIFFERENT COMPUTER WITH OTHER CURSOR CLIENT (Linux.deb x64) WORKS FLAWLESSLY.
Therefore i suppose some sort of agent related cache or memory overflow of the cursor client. - I am happy to provide further information using the Developer Tools if you point me in the right direction.
Steps to Reproduce
- ânew chatâ - prompt anything that needs terminal or shell interaction of the agent.
- âLegacy Terminal Toolâ on or off does not solve the problem.
- Installing 2.0.x Cursor (without complete prio uninstall of 2.1.50) does not solve, either
- Killing als cursor-server processes in wsl2: ubuntu and Win11 (restart) also does not solve the problem.
Operating System
Windows 11 â> WSL2: ubuntu
Current Cursor Version (Menu â About Cursor â Copy)
Version: 2.1.50 (user setup)
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
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.26200
Does this stop you from using Cursor
Yes - Cursor is unusable
UPDATE: Using Git-Bash is a successful workaround for me.
Another addition to the thread:**
Issue:** Terminal output capture not working â commands execute successfully (exit code 0) but only the command itself is shown in output, not the actual command results.
Terminal Profile Used:
-
Tested with multiple profiles:
-
Windows PowerShell (default)
-
PowerShell (PowerShell Core)
-
Command Prompt (cmd.exe)
-
Issue occurs with all profiles
Environment:
-
OS: Windows 10 (10.0.26100)
-
Running: Locally (not WSL/Remote)
-
Cursor Version: [Please fill in your Cursor version]
Steps Taken:
-
Enabled âLegacy Terminal Toolâ in Settings â Agents â Inline Editing & Terminal
-
Killed all terminals (Ctrl+Shift+P â âTerminal: Kill All Terminalsâ)
-
Restarted Cursor
-
Tested with default terminal settings (all custom settings removed)
-
Issue persists after all steps
Commands Tested:
-
Get-Location (PowerShell)
-
Write-Host âTest output messageâ (PowerShell)
-
echo Test output (PowerShell/CMD)
-
dir (CMD)
-
cd (CMD)
-
$PWD (PowerShell)
Results:
-
All commands execute successfully (exit code 0)
-
Output only shows the command itself, not the actual output
-
Example: Running Get-Location shows Get-Location in output instead of the current directory path
Settings Tested:
-
Legacy Terminal Tool: Enabled (after following forum instructions)
-
Default Profile: Tested Windows PowerShell, PowerShell, and Command Prompt
-
All other terminal settings: Reset to defaults
Request ID: a36d22a8-2cbc-4076-916b-15331bf7189b
I know this is probably out of Cursorâs control, but what are the chances you could ask Open AI to extend the free trial on Codex Max due to the issues with users on Windows?
Anyone solved this? Iâm stuck in this. All command run failed in WSL2
Same here. Terminal commands on WSL are being rejected or simply fail.
Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Actual Behavior
The agentâs shell commands return empty output. Investigating the terminal state files shows:
pid: -1
cwd: (empty)
active_command: echo âtestâ && pwd
Earlier in the session, an error was observed:
Working Directory: /mnt/c/Program Files/cursor/\home\james\hub-dev
ERROR: spawn /usr/bin/bash ENOENT
The working directory is a hybrid path mixing:
Windows path: /mnt/c/Program Files/cursor/
WSL path with wrong slashes: \home\james\hub-dev
This invalid path causes /usr/bin/bash to not be found.
Key Observations
Integrated terminal works - Opening terminal with Ctrl+` correctly spawns bash in WSL
Agent shell does not work - The background shell used by AI agents fails to spawn
Path confusion - The agent shell appears to use a hybrid Windows/WSL path that doesnât exist
pid: -1 - The shell process never starts (pid should be a positive integer)
Workarounds Attempted (Did Not Fix Agent Shell)
Set terminal.integrated.defaultProfile.linux to âbashâ
Set terminal.integrated.defaultProfile.windows to WSL profile
Added explicit bash path in terminal.integrated.profiles.linux
Set remote.WSL.useShellEnvironment to true
Restarted Cursor multiple times
Reloaded window
These settings fixed the integrated terminal (which was defaulting to PowerShell) but did not fix the agentâs background shell.
Workspace Settings Used
{
âfoldersâ: [{ âpathâ: â.â }],
âsettingsâ: {
âterminal.integrated.defaultProfile.linuxâ: âbashâ,
âterminal.integrated.defaultProfile.windowsâ: âUbuntu-24.04 (WSL)â,
âterminal.integrated.profiles.linuxâ: {
âbashâ: {
âpathâ: â/bin/bashâ,
âiconâ: âterminal-bashâ
}
},
âterminal.integrated.profiles.windowsâ: {
âUbuntu-24.04 (WSL)â: {
âpathâ: âwsl.exeâ,
âargsâ: [â-dâ, âUbuntu-24.04â],
âiconâ: âterminal-linuxâ
}
},
âremote.WSL.useShellEnvironmentâ: true
}
}
Suspected Root Cause
The agentâs background shell spawning code appears to:
Incorrectly construct the working directory path (mixing Windows and WSL paths)
Not properly detect that itâs in a WSL remote context
Use a different code path than the integrated terminal (which works correctly)
Impact
AI agents cannot execute any shell commands in WSL workspaces
This breaks workflows that require running tests, builds, git commands, etc.
Severely limits agent functionality in WSL development environments
Additional Context
Multiple WSL distributions installed (Ubuntu and Ubuntu-24.04)
Workspace opened via pinned taskbar shortcut (WSL path)
Issue persists across Cursor restarts
Issue appeared after opening workspace via different path formats (Windows Explorer vs WSL terminal)
Suggested Fix
The agent shell spawning code should:
Detect WSL remote context correctly
Use pure Linux paths when in WSL (e.g., /home/james/hub-dev, not hybrid paths)
Spawn /bin/bash from the correct WSL context
Use the same shell spawning logic as the working integrated terminal
Steps to Reproduce
Open a workspace in WSL (e.g., cd /home/user/project && cursor . or open .code-workspace file)
Verify the workspace is connected to WSL (bottom-left shows âWSL: Ubuntu-24.04â)
Open the integrated terminal - it works correctly with bash
Ask the AI agent to run any shell command (e.g., ârun pwdâ)
Observe that the command fails silently with no output
Expected Behavior
The AI agent should be able to execute shell commands in the WSL environment, just like the integrated terminal can.
Operating System
Linux
Current Cursor Version (Menu â About Cursor â Copy)
Agent Shell Fails to Spawn in WSL Workspace
Summary
The AI agentâs background shell fails to spawn when working in a WSL (Windows Subsystem for Linux) workspace. The regular integrated terminal works correctly, but the shell used by AI agents (for running commands) does not function.
Environment
- OS: Windows 11 with WSL2
- WSL Distribution: Ubuntu-24.04
- Cursor Version: [Check Help â About]
- Workspace: Opened via WSL Remote (
hub-dev.code-workspace)
Steps to Reproduce
- Open a workspace in WSL (e.g.,
cd /home/user/project && cursor .or open.code-workspacefile) - Verify the workspace is connected to WSL (bottom-left shows âWSL: Ubuntu-24.04â)
- Open the integrated terminal - it works correctly with bash
- Ask the AI agent to run any shell command (e.g., ârun
pwdâ) - Observe that the command fails silently with no output
Expected Behavior
The AI agent should be able to execute shell commands in the WSL environment, just like the integrated terminal can.
Actual Behavior
The agentâs shell commands return empty output. Investigating the terminal state files shows:
pid: -1
cwd: (empty)
active_command: echo "test" && pwd
Earlier in the session, an error was observed:
Working Directory: /mnt/c/Program Files/cursor/\home\james\hub-dev
ERROR: spawn /usr/bin/bash ENOENT
The working directory is a hybrid path mixing:
- Windows path:
/mnt/c/Program Files/cursor/ - WSL path with wrong slashes:
\home\james\hub-dev
This invalid path causes /usr/bin/bash to not be found.
Key Observations
- Integrated terminal works - Opening terminal with Ctrl+` correctly spawns bash in WSL
- Agent shell does not work - The background shell used by AI agents fails to spawn
- Path confusion - The agent shell appears to use a hybrid Windows/WSL path that doesnât exist
- pid: -1 - The shell process never starts (pid should be a positive integer)
Workarounds Attempted (Did Not Fix Agent Shell)
- Set
terminal.integrated.defaultProfile.linuxto âbashâ - Set
terminal.integrated.defaultProfile.windowsto WSL profile - Added explicit bash path in
terminal.integrated.profiles.linux - Set
remote.WSL.useShellEnvironmentto true - Restarted Cursor multiple times
- Reloaded window
These settings fixed the integrated terminal (which was defaulting to PowerShell) but did not fix the agentâs background shell.
Workspace Settings Used
{
"folders": [{ "path": "." }],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"terminal.integrated.defaultProfile.windows": "Ubuntu-24.04 (WSL)",
"terminal.integrated.profiles.linux": {
"bash": {
"path": "/bin/bash",
"icon": "terminal-bash"
}
},
"terminal.integrated.profiles.windows": {
"Ubuntu-24.04 (WSL)": {
"path": "wsl.exe",
"args": ["-d", "Ubuntu-24.04"],
"icon": "terminal-linux"
}
},
"remote.WSL.useShellEnvironment": true
}
}
Suspected Root Cause
The agentâs background shell spawning code appears to:
- Incorrectly construct the working directory path (mixing Windows and WSL paths)
- Not properly detect that itâs in a WSL remote context
- Use a different code path than the integrated terminal (which works correctly)
Impact
- AI agents cannot execute any shell commands in WSL workspaces
- This breaks workflows that require running tests, builds, git commands, etc.
- Severely limits agent functionality in WSL development environments
Additional Context
- Multiple WSL distributions installed (Ubuntu and Ubuntu-24.04)
- Workspace opened via pinned taskbar shortcut (WSL path)
- Issue persists across Cursor restarts
- Issue appeared after opening workspace via different path formats (Windows Explorer vs WSL terminal)
Suggested Fix
The agent shell spawning code should:
- Detect WSL remote context correctly
- Use pure Linux paths when in WSL (e.g.,
/home/james/hub-dev, not hybrid paths) - Spawn
/bin/bashfrom the correct WSL context - Use the same shell spawning logic as the working integrated terminal
Version: 2.1.50 (system setup)
VSCode Version: 1.105.1
Commit: 56f0a83df8e9eb48585fcc4858a9440db4cc7770
Date: 2025-12-06T23:39:52.834Z
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.26200
For AI issues: which model did you use?
Opus 4.5, Composer 1
Does this stop you from using Cursor
Yes - Cursor is unusable
+1, uninstalled cursor, cleared everything related to cursor within wsl & within windows, rebooted my computer and reinstalled cursor, worked for 1 command and then stopped working again
now trying to downgrade to previous version, hopefully that works
Thanks, work for me
Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Title: Shell tool returns exit code 0 but commands are not actually executed (v2.1.50)
Environment:
Cursor Version: v2.1.50
OS: Windows 10 (10.0.26100)
Shell: PowerShell
Workspace: Multi-root workspace with Japanese characters in path (OneDrive)
Steps to Reproduce:
Open a multi-root workspace with path containing Japanese characters
Use Agent mode Shell tool to run any command (e.g., echo âtestâ)
Command returns exit code 0 but no output is captured
File creation commands (e.g., New-Item) also report success but files are not created
Expected: Command output should be captured and returned
Actual: Exit code 0 returned, but no output and commands appear to not execute at all
Notes: Was working before v2.1.50 update
Steps to Reproduce
Bug Report Title (è±èȘ):
[Bug] Shell tool silently fails - returns exit code 0 but commands not executed (v2.1.50, Windows, Japanese path)
ăŸăăŻçăïŒ
Shell tool commands not executing after v2.1.50 update on Windows
Operating System
Windows 10/11
Current Cursor Version (Menu â About Cursor â Copy)
Cursor Version: v2.1.50
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor
Iâm experiencing the same issue, and it seems to be related to what I described here: Agent loses terminal output - #42 by Green .
In my case, the only thing that helps is deleting the entire directory located at
AppData\Roaming\Cursor\User\workspaceStorage, which of course removes the whole chat history.
After deleting the folder, Cursor works for a while, but then the problem eventually returns.
The issue isnât just about capturing terminal output â the main problem is that Cursor is unable to run tools at all. For example, try building a project: when everything is working, it takes several seconds. But when Cursor is âbroken,â it instantly returns a âsuccessâ response even though the build never actually starts.
Cursorâs agent is completely unusable now!
I tried with older version and currently with the latest version and I canât make a single call to any model.
Has the dev team made any progress?
Request ID: 2a212cd2-8556-48f2-a861-b07de7f82f5a
The only way this continues to work is if I select a really OLD conversation from the archive and have that open a terminal - this then reverts to old behaviour but i then have to keep using an older conversation and watch the âcontextâ - but this can get you going again.
@deanrie This is a critical error in Cursor that is stopping our workflow. When will a fix be deployed? We need this resolved ASAP.

