Where does the bug appear (feature/product)?
Cursor CLI
Describe the Bug
With multiple Cloud Agent VMs (or after archiving/switching agents), Forwarded Ports → localhost:5173 does not reliably map to the active agent’s Vite. Try Live / in-VM desktop shows the correct app; localhost:5173 either refuses connection or serves an older checkout from another VM. Switching the agent tab alone does not rebind the tunnel.
Steps to Reproduce
Run Cloud Agent A with Vite on 0.0.0.0:5173 (feature X in UI).
Run Cloud Agent B with Vite on 0.0.0.0:5173 (feature Y / newer commit). Confirm Try Live on B shows Y.
In Desktop Ports, observe green 5173; open http://localhost:5173/…
Switch active tab between A and B (or archive A).
Observe localhost still shows A’s UI (or refuses / sticks), while Try Live on B remains
Expected Behavior
Opening agent A’s chat and forwarding port 5173 maps localhost:5173 to agent A’s process listening on 0.0.0.0:5173.
Switching to agent B (or archiving A) drops or rebinds the forward so localhost cannot silently hit a stale VM.
Auto-Forward does not keep a green 5173 mapping to a dead/archived/wrong agent while Try Live on another agent shows the real UI.
Actual
Try Live on the correct agent (bc-dae18f8f-…, Vite 0.0.0.0:5173, current main with MonthNavigator) → correct UI.
http://localhost:5173/books without forward → ERR_CONNECTION_REFUSED (−102). Expected if nothing is forwarded.
With Ports showing green 5173 → often old prototype (no month navigator), i.e. tunnel hits a different/older agent checkout.
Changing the active agent tab does not switch Forwarded Ports to that agent’s 5173.
Workaround of moving Vite to :5179 on the good agent was attempted; Ports still emphasized 5173 from elsewhere. Archiving the good agent then broke the intended stack entirely until a new agent was started.
Operating System
Windows 10/11
Version Information
Version: 3.25.6 (user setup)
VS Code Extension API: 1.128.0
Commit: f0df777c412b670d09e3eaf214967d779e67c080
Date: 2026-10-14T22:46:28.448Z
Layout: Agent Window
Build Type: Stable
Release Track: Default
Electron: 42.10.0
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
xterm.js: 6.1.0-beta.291
OS: Windows_NT x64 10.0.19045
For AI issues: which model did you use?
Auto
Does this stop you from using Cursor
No - Cursor works, but with this issue