The AI agent’s Shell tool fails to execute commands when using Cursor on WSL2. The shell process never spawns (pid: -1), resulting in empty output for all commands. The integrated terminal works perfectly - only the agent’s shell execution is affected.
Steps to Reproduce
Open a workspace in Cursor on WSL2
Start an agent conversation
Have the agent attempt to run any shell command (e.g., echo “test”)
Expected Behavior
Shell command executes and returns output.
Operating System
Windows 10/11
Current Cursor Version (Menu → About Cursor → Copy)
Additional Context:
Manual terminal (Ctrl+) works perfectly - Only the agent’s shell tool is affected - No changes were made to WSL or shell configuration - Issue began after recent Cursor update
How did you downgrade? I tried downloading 2.1.42 and installing it overtop of 2.1.48, but I still have this bug. Do I need to do a complete uninstall? Any special considerations for WSL?
Then just exit cursor and run the lower version installer.
There might be something more you need to do if you have cursor installed inside WSL, but if it’s just installed as a windows app and connected to WSL through Remote Development that’s all I did.
This solution worked for me, thanks! But I think we should have an official fix on next patches from cursor team. Can anyone from cursor team look at this?
I am still having this problem and haven’t seen a solution provided. I have resorted to using other agents for shell execution and limiting the agent to modifying files but this is not acceptable even in the mid-term.
Commenting again to state that for some reason, console commands to WSL started working again after 3 days of failures without even upgrading Cursor to a new version or even restarting the IDE!! Go figure…