Agent sandbox leaves orphaned /tmp/sandbox-proxy-{http,socks}-*.sock files

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Each sandboxed agent shell command creates Unix domain sockets under /tmp:

  • /tmp/sandbox-proxy-http-.sock
  • /tmp/sandbox-proxy-socks-.sock

These are owned by the cursorsan helper (PID is in the filename). When the sandbox process exits, the sockets are not unlinked, so orphans accumulate under /tmp.

On one macOS machine this reached ~4114 sandbox-proxy-http-.sock files (plus a matching set of sandbox-proxy-socks-.sock), spanning mid-September through early November 2026. Almost none had a live process holding them — lsof only showed the current sandbox pair.

Steps to Reproduce

  1. Enable Agent Auto-Run in sandbox mode.
  2. Run many agent shell commands over days/weeks (network allowlist path that spins up the HTTP/SOCKS proxy helpers).
  3. ls /tmp/sandbox-proxy-http-.sock /tmp/sandbox-proxy-socks-.sock | wc -l
  4. Compare with lsof on those paths — most sockets have no owner process.

Expected Behavior

On sandbox exit (success, cancel, or crash), unlink both proxy sockets (or reuse a single well-known path per session) so /tmp does not fill with orphaned sandbox-proxy-http-.sock and sandbox-proxy-socks-.sock files.

Operating System

MacOS

Version Information

Cursor 3.27.22 (stable)
Commit: b1aa50cb6db84fd3e8c808259cb172ea73425c10
VS Code: 1.128.0
Date: 2026-10-27T00:33:02.045Z
OS: macOS 26.6.2 (Darwin 25.6.0), arm64

Additional Information

Workaround: manually delete orphans, e.g. find /tmp -maxdepth 1 -name ‘sandbox-proxy-*.sock’ -delete

This looks like a missing cleanup in the agent sandbox lifecycle, not a user/workspace issue. Both http and socks variants are left behind.

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey, thanks for the detailed report!

I was able to reproduce this. Every sandboxed command that goes through the network allowlist leaves its pair of sandbox-proxy-http/socks-<pid>.sock files in /tmp. I’ve shared it with the team.

In the meantime, your workaround is good. Running find /tmp -maxdepth 1 -name 'sandbox-proxy-*.sock' -delete is safe as long as no agent command is running at the time.