Open HTML files directly in the agent window

In the agent window, you can directly view files. Opening HTML files displays the code, but I’d prefer if there were a way to preview the files as nicely formatted web pages.
Then use the built-in browser’s design mode to comment and modify the web page.

Hey, good news, this already works in the Agents window.

To render HTML as a page, right-click the HTML file tab, then select Open in Browser. It’ll open in the built-in browser as a normal web page, not as code. This was added recently, so make sure you’re on the latest version of Cursor.

Next, in that browser, turn on Design Mode using the pen icon in the toolbar, or Cmd+Shift+D / Ctrl+Shift+D. In this mode, you can click elements, draw on top, and leave annotations, then ask the agent to apply changes based on those visual hints.

Let me know if you meant something else, or if Open in Browser doesn’t show up in the context menu.

Hey there, I am still not able to preview HTML in agents window. Attached below in the options when I select the html and my version infor for your reference.

Version: 3.21.13 (user setup)
VS Code Extension API: 1.128.0
Commit: e44a49c17e334d442e58bbde931d791200f014a0
Date: 2026-09-18T06:43:24.799Z
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.26200

Hey, thanks for the screenshot. It helped clarify what’s going on.

In your screenshot, you’re opening the context menu for the file tree right clicking a file in the left sidebar. That menu doesn’t have Open in Browser. That option is in the editor tab menu, not the file tree.

Try this:

  1. Open progress.html with a double click so it shows up as a tab at the top.
  2. Right click the tab itself the tab title, not the file in the tree.
  3. You should see Open in Browser in that menu. It’ll render the file as a normal web page in the built in browser.

Then in that browser, enable Design Mode the pen icon in the toolbar or Ctrl+Shift+D so you can click elements, draw on top, and leave annotations for the agent.

One more note: right clicking a file in the tree and seeing Open in Browser is not supported yet. It’s tracked separately here: Glass preview HTML files on open

Let me know if the option shows up when you right click the tab.