Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
Environment
- Cursor Desktop (macOS)
- Cursor version: 3.21.13 (confirm via About Cursor)
- Feature: cursor-ide-browser + CDP
Summary
After an Agent uses CDP Emulation.setDeviceMetricsOverride (e.g. 390×844, deviceScaleFactor 2) for mobile screenshots, the override sometimes remains ON. The browser panel can be fullscreen/wide, but window.innerWidth stays ~390 and the page keeps a mobile layout. Resizing the panel does not restore desktop layout.
Actual
- Override stays active; innerWidth ~390 while the panel is ~1440px wide.
- clearDeviceMetricsOverride restores ~1445px and desktop layout.
Workarounds
- CDP clearDeviceMetricsOverride; reload/close the tab; use Playwright/external browser for responsive QA.
Control
- Same Next.js app in Playwright: scrollWidth === clientWidth from 1440→390 (no document horizontal overflow).
Request
- Auto-clear device metrics when agent browser sessions end.
- Visible “device emulation active” indicator in the built-in browser.
Steps to Reproduce
Steps to reproduce
- Open a local app in Cursor’s built-in browser (agent: cursor-ide-browser).
- CDP: Emulation.setDeviceMetricsOverride width=390, height=844, deviceScaleFactor=2, mobile=true.
- End the agent session without Emulation.clearDeviceMetricsOverride.
- Expand/fullscreen the Cursor browser and resize it.
Expected Behavior
Expected
- Override cleared (or scoped) when agent automation ends.
- innerWidth tracks the actual panel width.
Operating System
MacOS
Version Information
Cursor version ~3.21.13
Does this stop you from using Cursor
Sometimes - I can sometimes use Cursor