Memory leak of cursor-server on ssh-connection

Describe the Bug

Since maybe two weeks I am having trouble using our compute cluster since almost all jobs abort at some point. I just found out that it is due to a memory leak of cursor-server that happens rapidly after opening an ssh-connection and then opening the cursor-file-explorer.

When I connect via ssh to the cluster using cursor it starts the processes

PID COMMAND rss_MB %CPU VSZ CMD
1554684 node 249.6 58.6 80863008 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node --dns-result-order=ipv4first /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=extensionHost --tr
1554490 node 120.2 28.0 11856204 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/server-main.js --start-server --host=127.0.0.1 --port 0 --connection-
1554808 node 56.9 7.0 11601008 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=ptyHost --logsPath /home/martin/.cursor-server/d
1554390 node 11.6 0.9 725820 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/multiplex-server/6f1b3e4b3170f5c7e88d1a15ae5c80182a74799f35540e2d611693e0d8ecb19f.js 88eb0258-969f-4942-a80d-a582aaf3

Then when I open the file explorer within cursor on the cluster, memory consumptions starts increasing:

PID COMMAND rss_MB CMD VSZ
1559597 node 268.1 47.4 80930348 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node --dns-result-order=ipv4first /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=extensionHost --tr
1554490 node 175.8 42.0 11907904 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/server-main.js --start-server --host=127.0.0.1 --port 0 --connection-
1559643 node 62.5 63.1 11595560 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=fileWatcher
1554808 node 38.6 1.5 11602680 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=ptyHost --logsPath /home/martin/.cursor-server/d
1554390 node 16.5 0.3 989244 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/multiplex-server/6f1b3e4b3170f5c7e88d1a15ae5c80182a74799f35540e2d611693e0d8ecb19f.js 88eb0258-969f-4942-a80d-a582aaf3

I don’t have to do anything, it just becomes more:

1554490 node 504.5 98.8 12242612 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/server-main.js --start-server --host=127.0.0.1 --port 0 --connection-
1559597 node 237.4 13.1 80896300 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node --dns-result-order=ipv4first /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=extensionHost --tr
1559643 node 107.7 62.5 11598304 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=fileWatcher
1554808 node 38.7 0.8 11602680 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=ptyHost --logsPath /home/martin/.cursor-server/d
1554390 node 21.0 0.1 989244 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/multiplex-server/6f1b3e4b3170f5c7e88d1a15ae5c80182a74799f35540e2d611693e0d8ecb19f.js 88eb0258-969f-4942-a80d-a582aaf

…

1554490 node 798.9 109 12544664 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/server-main.js --start-server --host=127.0.0.1 --port 0 --connection-t
1559597 node 236.9 8.6 80898348 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node --dns-result-order=ipv4first /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=extensionHost --tra
1559643 node 151.2 59.4 11666664 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=fileWatcher
1554808 node 39.9 0.6 11602680 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/out/bootstrap-fork --type=ptyHost --logsPath /home/martin/.cursor-server/d
1554390 node 21.4 0.1 989244 /home/martin/.cursor-server/bin/5b19bac7a947f54e4caa3eb7e4c5fbf832389850/node /home/martin/.cursor-server/bin/multiplex-server/6f1b3e4b3170f5c7e88d1a15ae5c80182a74799f35540e2d611693e0d8ecb19f.js 88eb0258-969f-4942-a80d-a582aaf3

Soon it hits the memory limit of 10GB and I basically can’t do anything anymore. When I close the cursor window in which I created the ssh connection, the memory usage stops increasing, but the memory is still allocated by the same PIDs at the level it had right before closing the window.

This behaviour is not happening on my local machine (MacPro M3 Max)! Also this problem did not exist for several months since I have been using cursor.
This behaviour is also not happening when using vscode instead of cursor.

It is really unfortunate because it makes cursor unusable for remote tasks!

Steps to Reproduce

To use the Cursor remote tunnel extension on the cluster I need to, from what I understand, install cursor-server manually, at least it did not work for me to just install the tunnel extension when I initially tried somewhen towards the end of last year. I created this script following some instructions I found in forums (unfortunately I did not find the orignal forum entry again) where people had the same issue. Maybe it’s related to the problem.

    #!/bin/bash

    echo "Updating Cursor tunnel"
    echo "Cleaning up existing installations"
    # Clean up existing installations
    rm -rf ~/.cursor-server ~/.vscode

    if [ ! -d ~/.cursor_cluster ]; then
        mkdir -p ~/.cursor_cluster
    fi
    cd ~/.cursor_cluster
    rm -f *

    echo "Reading version and commit from cursor_info.dat"

    # Read version and commit from cursor_info.dat
    info_file="/home/martin/sh_scripts/cursor_info.dat"
    version=$(grep "Version:" "$info_file" | head -1 | awk '{print $2}' | tr -d '\r')
    commit=$(grep "Commit:" "$info_file" | awk '{print $2}' | tr -d '\r')

    # Verify version and commit were read correctly
    echo "Version: $version"
    echo "Commit: $commit"

    # Set OS and architecture for download
    os="linux"
    arch="x64"

    # Construct download URL
    download_url="https://cursor.blob.core.windows.net/remote-releases/${version}-${commit}/vscode-reh-${os}-${arch}.tar.gz"
    echo ""

    echo "Downloading Cursor from: $download_url"
    echo ""
    # Download the package
    wget "$download_url"
    echo ""
    echo "Download complete"

    # Export commit for later use
    export CURSOR_COMMIT="$commit"

    # Create directory structure
    mkdir -p ~/.vscode/cli/servers/Stable-$CURSOR_COMMIT/server/

    # Extract the downloaded package
    tar -xzvf vscode-reh-${os}-${arch}.tar.gz --strip-components=1 \
    -C ~/.vscode/cli/servers/Stable-$CURSOR_COMMIT/server/

    # Copy cursor-server to code-server
    cp ~/.vscode/cli/servers/Stable-$CURSOR_COMMIT/server/bin/cursor-server \
    ~/.vscode/cli/servers/Stable-$CURSOR_COMMIT/server/bin/code-server

    echo "Cursor installation completed successfully!"

The file cursor_info.dat just contains information of the current version, so for example right now it would be

Version: 1.1.6
VSCode Version: 1.96.2
Commit: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850
Date: 2025-06-25T02:14:24.784Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0

Expected Behavior

No increasing Memory from just using the Cursor File Explorer on ssh-connection to compute cluster.

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.1.6
VSCode Version: 1.96.2
Commit: 5b19bac7a947f54e4caa3eb7e4c5fbf832389850
Date: 2025-06-25T02:14:24.784Z
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report!
Tagging @ravirahman as our resident expert to help with this.

1 Like

EDIT:
Contrary to what I wrote above I do observe a similar behaviour using VSCode, however when also using Tunnel and running python scripts. Memory Usage is going up over time, albeit not monotonously, from what I observed. Right now for example it’s pretty high:

PID COMMAND rss_MB %CPU VSZ CMD
141206 node 3023.1 19.7 5026436 /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/node /home/martin/.vscode-server/extensions/ms-python.vscode-pylance-2025.6.2/dist/server.bundle.js --cancellationReceive=file:af
44934 node 2982.4 12.9 5006072 /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/node /home/martin/.vscode-server/extensions/ms-python.vscode-pylance-2025.6.2/dist/server.bundle.js --cancellationReceive=file:0d
140084 node 994.7 21.7 2179180 /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/node /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/out/bootstrap-fork --type=fil
44025 node 735.2 9.7 2005532 /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/node /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/out/bootstrap-fork --type=fileW
140073 node 649.0 0.9 55043160 /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/node --dns-result-order=ipv4first /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/o
43957 node 645.4 0.7 66117264 /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/node --dns-result-order=ipv4first /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/o
3903521 node 91.6 0.2 11836784 /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/node /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/out/server-main.js --connectio
3903551 node 57.3 0.4 1543180 /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/node /home/martin/.vscode-server/cli/servers/Stable-2901c5ac6db8a986a5666c3af51ff804d05af0d4/server/out/bootstrap-fork --type=ptyHo
43496 code-2901c5ac6d 21.8 0.1 200904 /home/martin/.vscode-server/code-2901c5ac6db8a986a5666c3af51ff804d05af0d4 command-shell --cli-data-dir /home/martin/.vscode-server/cli --parent-process-id 43478 --on-host=127.0.0.1 --on-port

However, this was over the course of several hours, and not only a few minutes as for Cursor. I could not yet make the test of only running an ssh connection and having the VSC file explorer open, and observing how memory behaves.

Hi @MMichajlow, thank you so much for sharing all of these logs.

It is definitely concerning how quickly the memory is growing in the main process. Could you run this command in the directory that you have open in Cursor? It would be helpful to know (approx) how many files there are (recursively).

find . -type f 2>/dev/null | wc -l

Does the memory grow as quickly if you open up a smaller workspace?

Finally, could you try running the “kill remote server and reload window” command, and share whether the memory grows with a brand new process? We attempt to reuse processes between SSH connections, so it is possible that there might be some garbage left behind from the previous one. This command will ensure that you start a new process.

Thanks!

Hey Ravi, thanks for your reply!

find . -type f 2>/dev/null | wc -l yields 1036428 and “kill remote server and reload window” unfortunately does not stop the growing of memory consumption.