Summary
In Claude Agent View (cloud-hosted background sessions on claude.ai), when an MCP tool
or subprocess invokes webbrowser.open() or surfaces a http://localhost:<port>/ URL,
no browser is opened and the URL is not previewed inline. The URL appears as plain text
in chat, but is unreachable from the user's machine because the server is bound to the
agent sandbox's loopback interface.
This makes any tool that depends on a local rendered page effectively unusable in Agent
View. Examples: streamlit run, matplotlib plt.show(), Jupyter kernel launchers, any
"render and open in browser" affordance.
Repro
- Run a background session in Claude Agent View.
- Invoke any tool that opens a localhost URL via
webbrowser.open("http://localhost:<port>/").
- Tool stdout reports the URL; agent surfaces it in chat.
Expected: URL is auto-previewed inline (like the desktop app's Preview pane), or
there is a clickable affordance to open it.
Actual: Nothing visible happens. The URL is plain text. Copy-pasting into a local
browser fails because 127.0.0.1:<port> inside the agent sandbox is not reachable
from the user's machine.
Why it matters
- Many local renderers ship with a "render then open in browser" contract. These are
silently broken in Agent View today.
- Background sessions are otherwise ideal for long-running render workflows, but
the missing browser handoff defeats the loop.
Related issues
Suggested directions
- Auto-render localhost URLs in agent message output via the Agent View UI's preview
pane (parity with desktop app behaviour).
- Or: introduce a "render artifact" tool result type (HTML / image / iframe) so MCP
tools can return inline-displayable payloads instead of relying on a side-channel
browser.
- Or: tunnel the agent sandbox's localhost ports back to the user's browser session
(Cloudflare-tunnel-style relay).
Summary
In Claude Agent View (cloud-hosted background sessions on claude.ai), when an MCP tool
or subprocess invokes
webbrowser.open()or surfaces ahttp://localhost:<port>/URL,no browser is opened and the URL is not previewed inline. The URL appears as plain text
in chat, but is unreachable from the user's machine because the server is bound to the
agent sandbox's loopback interface.
This makes any tool that depends on a local rendered page effectively unusable in Agent
View. Examples:
streamlit run, matplotlibplt.show(), Jupyter kernel launchers, any"render and open in browser" affordance.
Repro
webbrowser.open("http://localhost:<port>/").Expected: URL is auto-previewed inline (like the desktop app's Preview pane), or
there is a clickable affordance to open it.
Actual: Nothing visible happens. The URL is plain text. Copy-pasting into a local
browser fails because
127.0.0.1:<port>inside the agent sandbox is not reachablefrom the user's machine.
Why it matters
silently broken in Agent View today.
the missing browser handoff defeats the loop.
Related issues
Suggested directions
pane (parity with desktop app behaviour).
tools can return inline-displayable payloads instead of relying on a side-channel
browser.
(Cloudflare-tunnel-style relay).