microsoft / microsoft/vscode

Integrated browser remote proxy should support remote AHP hosts in Agents window

Open
#331,926 2 comments 3 reactions 2 assignees Claimed by @kycutler View on GitHub
browser-integration feature-request
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

When an Agents window session is connected to a remote Agent Host Protocol (AHP) host, please allow integrated-browser traffic to be proxied through that session's remote host. This could be automatic for agent-opened tabs or an explicit per-tab **Browse through Agent Host** target.

## Why

The integrated browser can proxy through VS Code Remote workspace authorities, but a remote AHP host selected by an Agents window session is not treated as a proxy authority. As a result, an agent can run a service on its remote host but cannot open that service in the integrated browser without separately exposing or forwarding the port.

This also prevents secure loopback workflows where a browser needs to send an artifact directly to a one-use receiver on the selected agent host.

## Reproduction

Environment:

- Local client: VS Code 1.134.0 on macOS (integrated browser user agent: Electron 42.8.1 / Chrome 148)
- Remote AHP host: Windows, VS Code CLI/host 1.133.0
- Agents window session connected to that remote host
- Settings applied locally and the Agents window reloaded:

```json
"workbench.browser.enableRemoteProxy": true,
"workbench.browser.dataStorage": "workspace"
```

Steps:

1. On the remote Windows AHP host, start an HTTP server bound to `127.0.0.1:43127` that returns a unique nonce from `/probe`.
2. Verify from the remote host that `http://127.0.0.1:43127/probe` returns `200` and the nonce.
3. From the AHP-backed agent session, call the integrated-browser tool to open `http://127.0.0.1:43127/probe`.
4. Repeat with `http://localhost:43127/probe`.

Actual result:

- Both URLs fail with `net::ERR_CONNECTION_REFUSED`.
- The request never reaches the remote Windows server.
- The browser tab shows no remote indicator.
- The URL is resolved against the local macOS client, not the AHP host.

Expected result:

- The selected remote AHP host is available as a browser proxy target.
- Agent-opened tabs associated with that session can reach HTTP/HTTPS endpoints visible only to the AHP host.
- The browser shows the remote indicator and preserves per-session isolation.

## Related, but not duplicates

- #293229 implemented proxying through Remote Workspace connections via `workbench.browser.enableRemoteProxy`.
- #321294 tested that feature for Tunnels, SSH, Dev Containers, WSL, and Codespaces, including agent-opened tabs.
- #314789 tracks broad embedded-browser parity for remote Agent Hosts in the Agents window, but does not describe routing localhost/browser traffic through the selected AHP host.
- #324828 concerned a Remote Workspace BrowserView regression; disabling remote proxy fixed that issue. Here, remote proxy never activates for the AHP host at all.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.