Cursor agent is unable to run terminal commands that connect to Docker containers

Hey, thanks for the report. This is a known issue. On macOS, the sandbox blocks Unix domain sockets, which Docker uses for connections, even if the paths are added to additionalReadwritePaths. More details in a similar thread: MacOS sandbox blocking Docker socket connection

As a workaround, create or edit ~/.cursor/sandbox.json and add:

{
  "networkPolicy": {
    "default": "allow"
  }
}

This will allow network connections inside the sandbox, including Unix sockets for Docker.

Also, since you mentioned it doesn’t work even without the sandbox, check macOS System Settings > Privacy & Security > Local Network and make sure Cursor is allowed there. Starting with macOS Sequoia, Apple requires explicit permission to connect to localhost.

Let me know if the workaround helped.