Right now, the Cursor browser settings let you toggle two things:
Show Localhost Links in Browser – auto-opens localhost links in the Cursor Browser
Open Web Links in Browser – auto-opens http/https links in the Cursor Browser
This is great as a baseline, but there’s no way to whitelist specific domains or TLDs beyond plain localhost. I’d love a setting where I can add a list of custom domains/TLDs that should also be treated as “open in Cursor Browser by default.”
My use case:
I use Vercel portless (or a similar local proxy setup) to run my dev branches on subdomains like:
my-branch.my-project.localhost
another-branch.my-project.localhost
These resolve locally and behave just like localhost, but because they don’t match the literal localhost host, they don’t open in the Cursor Browser. I have to copy/paste the URL manually every time, which kind of defeats the purpose of the integration.
What I’d like:
A new field in Settings → Browser (or in settings.json) that accepts a list of patterns, e.g.:
Hey @gabe! Had no idea this feature existed honestly.
“Show Localhost Links in Browser” is actually a bit narrower than it sounds. It watches your terminal output for specific dev server startup banners (Vite, Next.js, Create React App) and auto-opens the URL in the Cursor Browser when it detects one. As you’ve realized, the matching is hardcoded to localhost, 127.0.0.1, and 0.0.0.0.
It also seems a bit flaky.
Are you expecting this to trigger when you manually run your dev server in the terminal, or when the agent starts it for you? If the latter, the shortest route might be a Cursor rule that tells the agent to always print the dev server URL after starting it, that way it’s right there to click.
(BTW this is all using the new Agent/Glass UI. I think I made this unclear originally. I am not using the IDE)
That would actually be convenient (detecting URLs to auto-open when printed by Vercel’s Portless). Portless is quite new, but is a great fix the multi-agent ports problem and will probably become a standard. Has gotten big on X as of recent.
The original intention of this suggestion was actually to change Cursor’s behavior when I click on URLs on the agent chat window. Right now, when:
“Open Web Links in Browser” is ON: Clicking a link in the agent chat opens the link in the Cursor browser in the workspace of the agent chat.
This is what I would expect, HOWEVER there is an unrelated bug that currently seems to cause links to only open in the Cursor browser located within my Home workspace.
Because of this unrelated bug, your suggestion would not even work because links would open in the Home workspace. If I do not have the Home workspace visible in Cursor Glass, then the link seemingly does not open anywhere (until I add the Home workspace to my sidebar and go into it)
“Open Web Links in Browser” is OFF: Clicking a link in the agent chat opens the link in your default system browser. This is what I would expect.
The same behavior is observed with localhost links when toggling on/off the “Show Localhost Links in Browser” setting - which would make me think that these settings do more than you suggested.
I would like to keep “Open Web Links in Browser” OFF, “Show Localhost Links in Browser” ON and yet have Portless local links open in the Cursor browser.