Describe the Bug
When a Docker-Compose-based Dev-Container workspace exposes port 3002 from a reverse-proxy container, Cursor 1.2.3 and 1.2.4 auto-forward that port to a different container (the main application container) that merely opens the same port internally.
The auto-forwarded entry shows the application process, not the proxy.
Requests therefore hit the wrong service (Express, Vite, etc.) instead of the proxy / downstream service.
forwardPorts, portsAttributes, and onAutoForward:“ignore” in devcontainer.json are ignored.
Cursor 1.2.2 (and VS Code) forward the port correctly.
Steps to Reproduce
Open any Dev-Container workspace that uses Docker Compose with two services:
reverse-proxy – publishes 3002 to the host (“3002:3002”).
app – runs dev server internally on 3002 but does not publish it.
Include in devcontainer.json:
“forwardPorts”: [3002],
“portsAttributes”: { “3002”: { “onAutoForward”: “ignore” } },
“otherPortsAction”: “ignore”
Open the folder in Cursor 1.2.4 (or 1.2.3) and let it build.
Observe the Ports panel:
Port 3002 is auto-forwarded to the app container instead of the reverse-proxy container.
Downgrade Cursor to 1.2.2, reopen the same workspace → port 3002 now maps to the reverse-proxy container as expected.
Expected Behavior
Cursor should forward the published host port (3002) to the container that actually publishes it (reverse-proxy).
User overrides (forwardPorts, portsAttributes) must take precedence over auto-detection.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
MacBook Pro
14-inch, Nov 2024
Chip: Apple M4 Pro
Memory: 24 GB
Startup disk: Macintosh HD
macOS: Sequoia 15.5
Additional Information
Docker Desktop 4.41 (also happens with Podman 5.0)
Docker-Compose v2.35.1
Dev-Container Spec v1.0.0-rc.3
Removing /var/run/docker.sock, changing internal port, or editing portsAttributes does not change behaviour in 1.2.4
The issue appears to be a regression in Cursor’s auto-port-detection logic introduced after 1.2.2
Does this stop you from using Cursor
Yes - Cursor is unusable
