Hey, this is a known issue with WSL resource limits during long sessions. By default, WSL caps memory at 50% of your host RAM, often around 4 GB. During heavy use, Cursor’s server process inside WSL can run out of resources, which causes the disconnect.
Here’s what should help:
Create or edit %USERPROFILE%\.wslconfig with these settings:
It’s also worth checking htop inside WSL to see if CPU or memory is maxing out right before the disconnect. That can confirm if resource limits are the root cause.
Let me know if this helps, or if the disconnects continue after the config change.