agentHost: allow enabling tunnel access to local agent host#310294
Merged
connor4312 merged 2 commits intomainfrom Apr 16, 2026
Merged
agentHost: allow enabling tunnel access to local agent host#310294connor4312 merged 2 commits intomainfrom
connor4312 merged 2 commits intomainfrom
Conversation
Contributor
📬 CODENOTIFYThe following users are being notified based on files changed in this PR: @bpaseroMatched files:
@deepak1556Matched files:
|
Contributor
Screenshot ChangesBase: Changed (17)blocks-ci screenshots changedReplace the contents of Updated blocks-ci-screenshots.md<!-- auto-generated by CI — do not edit manually -->
#### editor/codeEditor/CodeEditor/Dark

#### editor/codeEditor/CodeEditor/Light
 |
Yoyokrazy
previously approved these changes
Apr 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an opt-in “tunnel host” capability so the Sessions desktop app can expose a local agent host over a dev tunnel (enabling remote connections), including a UI toggle and shared-process hosting implementation.
Changes:
- Add Sessions desktop contribution + UI action/view-item to toggle “Allow Remote Connections” and view related output.
- Introduce a renderer-side
ITunnelHostServicethat requests an on-demand local agent-host WebSocket listener and starts/stops hosting via shared process IPC. - Add a shared-process
TunnelHostMainServicethat creates/dev-hosts a dev tunnel and pipes forwarded connections into the local agent host socket.
Show a summary per file
| File | Description |
|---|---|
| src/vs/sessions/sessions.desktop.main.ts | Wires the new tunnel host contribution into the Sessions desktop entrypoint. |
| src/vs/sessions/contrib/tunnelHost/common/tunnelHost.ts | Defines the Sessions-side ITunnelHostService contract. |
| src/vs/sessions/contrib/tunnelHost/electron-browser/tunnelHostService.ts | Implements renderer-side tunnel hosting orchestration + auth token acquisition. |
| src/vs/sessions/contrib/tunnelHost/electron-browser/tunnelHost.contribution.ts | Registers service, UI toggle action, output action, and configuration. |
| src/vs/sessions/contrib/tunnelHost/electron-browser/toggleRemoteConnectionsActionViewItem.ts | Adds a custom titlebar action view item with hover + toast + connecting pulse. |
| src/vs/sessions/contrib/tunnelHost/electron-browser/media/tunnelHost.css | Styles for the toggle button, pulse animation, and toast. |
| src/vs/platform/agentHost/common/agentService.ts | Adds IConnectionTrackerService.startWebSocketServer() and IAgentHostSocketInfo. |
| src/vs/platform/agentHost/electron-browser/agentHostService.ts | Exposes IAgentHostService.startWebSocketServer() by proxying to the tracker channel. |
| src/vs/platform/agentHost/node/agentHostMain.ts | Implements on-demand WebSocket server creation for tunnel hosting via IPC. |
| src/vs/platform/agentHost/common/tunnelAgentHost.ts | Adds IPC channel/types for tunnel hosting service (ITunnelAgentHostHostingService). |
| src/vs/platform/agentHost/node/tunnelHostMainService.ts | Implements shared-process tunnel creation/hosting and stream piping to local socket. |
| src/vs/code/electron-utility/sharedProcess/sharedProcessMain.ts | Registers and exposes the tunnel host service over a shared-process IPC channel. |
Copilot's findings
- Files reviewed: 12/12 changed files
- Comments generated: 4
Yoyokrazy
approved these changes
Apr 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.