Repository navigation
Description
Hi everyone, hope you're doing well! Thanks a lot for #3512, browse open example.com and browse open localhost:3000 now just work, which is really nice for quick sessions.
Before submitting an issue, please:
- Check the documentation for relevant information
- Search existing issues to avoid duplicates
Environment Information
Stagehand:
- Language/SDK: TypeScript,
browseCLI - Stagehand version: browse 0.12.0 (stagehand 4.4.0), local Chrome, Node 26; code checked on main at 97ff3e1
AI Provider:
- Provider: none (no AI commands involved)
- Model: n/a
Issue Description
browse tab new <url> sends the url to Chrome as typed, so bare hosts that browse open now accepts (example.com, localhost:8123) fail in tab new.
browse tab new [url] opens a new tab, makes it active and optionally navigates it. The browse skill offers it next to browse open <url> as an equal way to recover from "No active page" (SKILL.md L394), so agents tend to pass it the same kind of url.
What happens today:
Open.runpasses the url throughnormalizeUrlScheme(open.ts L40-L42), solocalhost:8123becomeshttp://localhost:8123.TabNew.runsendsargs.urlstraight to thetab.newdriver command (tab/new.ts L26-L29).- The
tab.newhandler hands it tocontext.newPage(url)unchanged (tabs.ts L12-L15). browse tab new example.comexits 1 with-32000 Cannot navigate to invalid URL.browse tab new localhost:8123waits 15s and exits 1 withNavigation start timed out after 15000ms, since Chrome readslocalhost:as a scheme.
Expected: when a url is given, tab new handles the scheme the same way open does, so browse tab new example.com lands on https://example.com and browse tab new localhost:8123 on http://localhost:8123.
flowchart LR
A["browse open localhost:8123"] --> N["normalizeUrlScheme"] --> D1["open handler"] --> OK["http://localhost:8123 loads"]
B["browse tab new localhost:8123"] --> D2["tab.new handler"] --> P["context.newPage raw url"] --> F["timeout, exit 1"]
Steps to Reproduce
- Serve any page on port 8123 (
python3 -m http.server 8123). browse open localhost:8123 --local --headless --session sgworks.browse tab new example.com --session sgandbrowse tab new localhost:8123 --session sgboth fail.
Minimal Reproduction Code
browse open localhost:8123 --local --headless --session sg
browse tab new http://localhost:8123 --session sg # ok
browse tab new example.com --session sg; echo "exit=$?"
browse tab new localhost:8123 --session sg; echo "exit=$?"
browse tab list --session sgThe published browse 0.12.0 already includes #3512, and tab/new.ts is the same there and on main.
Error Messages / Log trace
$ browse open localhost:8123
{"title":"Repro Page","url":"http://localhost:8123/"}
$ browse tab new http://localhost:8123
{"title":"Repro Page","url":"http://localhost:8123/"}
$ browse tab new example.com
-32000 Cannot navigate to invalid URL
exit=1
$ browse tab new localhost:8123
Navigation start timed out after 15000ms
exit=1
$ browse tab list
[0,"Repro Page","http://localhost:8123/"]
[1,"Repro Page","http://localhost:8123/"]
[2,"Stagehand","chrome-extension://amonopfneclcghjeccidjnfgaekhjeph/blank.html"]
[3,"Stagehand","localhost:8123"]
A smaller, separate thing visible above: each failed call leaves a tab behind (2 and 3). It looks like newPage creates the target first and then navigates, so any failed navigation in tab new leaves a tab, not only the scheme case.
Screenshots / Videos
normalizeUrlScheme with its single caller Open.run and its three callees, Functions view in Architect
Related Issues
- Related to: fix(cli): prefix scheme for bare-host URLs in browse open #3512 (scheme handling for
browse open) - Related to: test(cli): adversarial fast-check verification and bug fixes across browse CLI #3562 by @miguelg719, which tightens
normalize-url.tsbut doesn't touchtab/new.ts, so a fix here could build right on top of it
Would you prefer the fix to simply call normalizeUrlScheme in TabNew.run when a url is given (after #3562 lands), and would you also like a failed navigation to close the new tab, or keep that as a separate change? Happy to send a small PR for whichever you prefer.

Activity
shrey150 commentedon Nov 30, 2026
Hey @abhiramshaji-cyber thanks for reporting this! looks like we have a suitable implementation from @embrace897 - I'll get this over the line and into the next release. appreciate the contribution :)
[Claimed browserbase#3577] fix(cli): prefix scheme for bare-host URLs…
abhiramshaji-cyber commentedon Nov 30, 2026
Thanks so much @shrey150 for landing this so quickly, really appreciate it! And a big thank you to @embrace897 for the original fix and tests in #3577, it made for a really clean change. Looking forward to seeing it in the next
browserelease!