Terminal leaks runninng processes when canceled

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Terminal leaks running processes when canceled.

Steps to Reproduce

  1. Ask an agent to run “sleep 300” in a foreground terminal. Wait for it to start running.
  2. Dump pstree -ta and locate the sleep process appropriately parented under Cursor.
  3. Stop the agent with the stop button in the GUI.
  4. Run pstree again and observe that the sleep process is now daemonized and is parented under systemd.

Expected Behavior

Stopping the agent should forcibly kill all processes. You can imagine how having two builds running concurrently in the same repo can cause problems, etc. Also, why is it even allowed to daemonize? It should be in a cgroup all to itself.

Operating System

Linux

Current Cursor Version (Menu → About Cursor → Copy)

Version: 1.6.45 (user setup)
VSCode Version: 1.99.3
Commit: 3ccce8f55d8cca49f6d28b491a844c699b8719a0
Date: 2025-09-22T18:22:38.013Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Windows_NT x64 10.0.26100

For AI issues: which model did you use?

gpt-5

For AI issues: add Request ID with privacy disabled

Can’t due to organizational restrictions.

Does this stop you from using Cursor

Sometimes - I can sometimes use Cursor

pstree_while_running.txt (5.3 KB)

pstree_after_canceled.txt (5.2 KB)

Hey, thanks for the report, we’ll look into it.

1 Like

Still happening on latest stable:

Version: 1.7.17 (Universal)
VSCode Version: 1.99.3
Commit: 34881053400013f38e2354f1479c88c9067039a0
Date: 2025-09-29T03:10:26.099Z
Electron: 34.5.8
Chromium: 132.0.6834.210
Node.js: 20.19.1
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.6.0

Version string copied from Mac UI this time but it’s a Linux (Ubuntu 22.04 LTS) dev machine. It’s getting pretty tedious to have to pkill -f random stuff after every canceled command.

This topic was automatically closed 22 days after the last reply. New replies are no longer allowed.