Visual Studio Code
Visual Studio Code provides the agent host used for current Agent Console compatibility testing. These instructions are specific to VS Code; Agent Console itself connects to hosts through the Agent Host Protocol.
VS Code’s built-in host exposes its Copilot and Claude coding agents to AHP clients.
Check the available options
Section titled “Check the available options”Install the code command-line tool, then run:
code agent host --helpThe output for your installed version lists the available host modes and options.
Direct connection
Section titled “Direct connection”To make the host reachable from another device on the same local network or VPN, run:
code agent host --host 0.0.0.0This binds the host to all network interfaces. VS Code protects it with a connection token
unless you explicitly disable that behavior, and prints a WebSocket URL containing the
token. Use --help to choose a specific interface or port instead.
In Agent Console:
- Open Add Host.
- Enter a name under Direct Connection.
- Paste the complete WebSocket URL.
- Tap Add.
The app probes the URL before saving it. Keep the complete URL private because its token grants access to the host.
See Connections for network and TLS guidance.
Cloud tunnel
Section titled “Cloud tunnel”To publish the host through Microsoft Dev Tunnels, run:
code agent host --tunnelThen, in Agent Console:
- Open Add Host.
- Under Tunnel Connection, choose Microsoft Dev Tunnels.
- Sign in with GitHub when prompted.
- Select the tunnel created for the agent host.
Agent Console resolves the tunnel address when it connects. Offline hosts remain visible and can reconnect without editing a saved URL.
Agent and tunnel accounts
Section titled “Agent and tunnel accounts”The Microsoft Dev Tunnels sign-in authorizes access to the tunnel. An agent such as GitHub Copilot can request a separate sign-in through the host. Both currently use GitHub device flow, but Agent Console treats them as separate sign-ins and stores separate tokens, even when you use the same GitHub identity.
Protocol compatibility
Section titled “Protocol compatibility”If Agent Console reports an unsupported protocol version, update VS Code and try again. The negotiated AHP version for a connected host is available in its detail screen.