CursorAI/Bug/26/03/Dozens of cursor-shell processes in Activity Monitor
CursorAI Bug - Dozens of
cursor-shellprocesses in activity monitorps aux | grep cursor-shell | wc -l 26Cursor Shell Process Accumulation — Technical Summary
Observation
26cursor-shellprocesses were running despite Cursor UI being closed.
Initial Inspection- Most processes had
PPID = 1→ orphaned and adopted bylaunchd. - State
S/Ss→ sleeping, not zombies. - CPU ~0%, low memory usage.
- Multiple agent versions present:
- Backing binaries located in:
~/.local/share/cursor-agent/versions/...
Process Role
cursor-shellis: - A Node-based PTY host
- Backend for Cursor terminal sessions
- Manages:
- Cursor spawns agent processes per workspace/session.
- On exit or upgrade, agents were not fully cleaned up.
- Old agents persisted as detached orphan processes.
- Cursor update left prior agent version processes running.
- Over time, accumulation reached 26.
Why tmux Died During Cleanup
Running:
pkill -f cursor-shell
Killed: - Orphaned agents (expected)
- Active
cursor-shellbacking a live tmux PTY (unexpected)
Since tmux depended on that PTY host, killing it terminated the controlling terminal → tmux exited.
This was expected Unix behavior, not corruption.
Current State - Orphaned processes removed.
- One active
cursor-shellremains attached to real TTY. - No evidence of network activity or malicious behavior.
- Issue classified as lifecycle leakage, not security concern.
Lessons cursor-shellserves dual purpose: background agent + terminal PTY host.- Bulk
pkillis unsafe when PTY-backed sessions exist. - Safer cleanup: kill only processes with
PPID == 1.
Conclusion
Behavior consistent with Electron-style process leakage across upgrades and workspace churn. Not abnormal, but poor process lifecycle management.