Sandboxed agent shell commands intermittently hang forever with zero output — even trivial commands like echo, true, pwd, whoami, kill -9, ps. Roughly 1 in 3 sandboxed invocations got stuck in this session. No error, no timeout — they simply never return unless manually terminated by the user.
Steps to Reproduce
Repro steps:
Open an agent session in a Linux devcontainer running on Docker Desktop (linuxkit kernel)
Run several sequential trivial shell commands via the agent (e.g. echo test, true, pwd)
Observe that some fraction hang indefinitely with no output, while others succeed normally
Restart the container and repeat — same behavior recurs
Expected Behavior
Trivial shell commands should return in well under a second.
This is a known issue with the terminal sandbox. Before each command, the sandbox scans the workspace filesystem to build its security policy. On Docker Desktop’s FUSE-backed mounts (how files are shared into devcontainers), that scan can hang when the FUSE layer stalls, which is why even trivial commands get stuck.
A few workarounds:
Disable sandboxed execution in your auto-run settings (if your team’s admin policy allows). This removes the pre-command scan entirely and should immediately unblock you.
Clone the repo onto the container’s native filesystem (a Docker named volume or clone inside the container) instead of using a host bind-mount. This avoids the FUSE layer.
Try switching Docker Desktop’s file-sharing backend between VirtioFS and gRPC FUSE in Docker Desktop settings. One may be more stable for your setup.
Our team is aware of this and working on reducing the sandbox’s scanning overhead. I’ve attached your report to the tracking issue.
Following up on this one. Since you posted, we’ve shipped several improvements to the terminal sandbox’s pre-command workspace scan (the step that was stalling on the FUSE-backed mount). It now does far less filesystem work per command, and those changes are all in the latest version of Cursor.
Could you give it another try on the latest version? Quick check:
Open an agent session in your Linux devcontainer on Docker Desktop
Run a few trivial commands through the agent (echo, pwd, true)
See whether any of them still hang with no output
If sandboxed commands still hang for you, updated details would help, and the workarounds shared earlier in this thread (cloning onto the container’s native filesystem in particular) are still valid in the meantime.