Cursor version 2.1.39 has terminal bug

I am facing the same issue: check if this solves your problem. the recommended fix didn’t solve my bug:
Agent Shell tool fails to spawn shell process on WSL (pid: -1) - Bug Reports - Cursor - Community Forum