- Copilot Chat Extension Version: Bundled with VS Code 1.134 client; remote Copilot CLI runtime 1.0.79-6
- VS Code Version: 1.134 client; remote standalone Agent Host 1.133.0 Stable (
a5b500951314efd502d07465bd138dfbd714a960)
- OS Version: macOS 26 on Apple Silicon (client); Windows 11 (remote host)
- Feature: Agents window connected to a remote standalone Agent Host over an AHP tunnel
- Selected model: GPT-5.6 Sol, xhigh
- AHP version: 0.8
Description
A user-level custom agent installed on a remote AHP host (~/.copilot/agents/*.agent.md) is discovered by the host and works when selected directly through AHP, but the VS Code Agents window cannot use it correctly.
This is specific to a custom agent supplied by a remote AHP host, not a workspace custom agent disappearing after the first prompt.
There are three related symptoms:
- The host custom agent is missing when creating a session. In the new-session UI for the AHP tunnel, the Agent picker does not list the custom agent, so the session cannot be started with it.
- It appears after the session starts, but cannot be selected. Once a default Copilot session exists, the custom agent appears under the Agent button. Clicking it does not change the active selection; the button remains on the default
Agent.
- A direct AHP selection works for one turn, but the UI does not retain it. Sending
chat/turnStarted with the discovered custom agent's message.agent.uri runs that turn with the custom agent. After the turn completes and the session is viewed or continued in VS Code, the UI does not stay on that custom agent. The next UI-submitted message runs as the default assistant.
Steps to Reproduce
- Run a standalone Agent Host on a remote machine and connect VS Code to it through an AHP tunnel.
- Put a valid user-level custom agent on the host under
~/.copilot/agents/<name>.agent.md.
- In the macOS VS Code Agents window, start creating a new session on that AHP host.
- Open the Agent picker.
- Observe that the host custom agent is not available before session creation.
- Start the session with the default Copilot agent.
- Open the Agent picker in the running session.
- Observe that the host custom agent is now listed.
- Click the custom agent.
- Observe that the active selection remains
Agent; submitting a message uses the default assistant.
- As a control, create/subscribe to a session over AHP and send the first
chat/turnStarted with message.agent.uri set to the URI advertised for the host custom agent.
- Observe that this turn correctly uses the custom agent.
- Continue the same session from the VS Code Agents window.
- Observe that the custom-agent selection is not retained and the next turn uses the default assistant.
Diagnostic evidence
The host advertises the custom agent in the materialized session's customizations, with a file URI under the remote host's ~/.copilot/agents directory. Direct AHP invocation using that URI succeeds, proving that the file is valid, discovered, and usable by the provider.
For the direct-AHP turn, the session records a successful custom-agent selection and follows its instructions. Before the next message submitted through the VS Code UI, the session records the equivalent of:
custom agent selected
custom agent deselected
user message submitted
response uses default assistant
The selected model remains unchanged, and no selection error is shown to the user.
Expected behavior
- Host-scoped custom agents should be available in the Agent picker while creating a session on that AHP host.
- Clicking a host custom agent in a running session should update the active Agent selection.
- After a custom agent is selected, the Agents window should retain that choice for subsequent messages (and after reopening the session) until the user explicitly selects another agent.
- UI-submitted turns should include the selected custom agent's
message.agent.uri.
Actual behavior
- The host custom agent is absent during new-session creation.
- It becomes visible only after a default session exists.
- Clicking it does not activate it.
- A direct AHP-selected custom agent works for one turn, but VS Code clears/omits the selection on the next UI turn without warning.
a5b500951314efd502d07465bd138dfbd714a960)Description
A user-level custom agent installed on a remote AHP host (
~/.copilot/agents/*.agent.md) is discovered by the host and works when selected directly through AHP, but the VS Code Agents window cannot use it correctly.This is specific to a custom agent supplied by a remote AHP host, not a workspace custom agent disappearing after the first prompt.
There are three related symptoms:
Agent.chat/turnStartedwith the discovered custom agent'smessage.agent.uriruns that turn with the custom agent. After the turn completes and the session is viewed or continued in VS Code, the UI does not stay on that custom agent. The next UI-submitted message runs as the default assistant.Steps to Reproduce
~/.copilot/agents/<name>.agent.md.Agent; submitting a message uses the default assistant.chat/turnStartedwithmessage.agent.uriset to the URI advertised for the host custom agent.Diagnostic evidence
The host advertises the custom agent in the materialized session's
customizations, with a file URI under the remote host's~/.copilot/agentsdirectory. Direct AHP invocation using that URI succeeds, proving that the file is valid, discovered, and usable by the provider.For the direct-AHP turn, the session records a successful custom-agent selection and follows its instructions. Before the next message submitted through the VS Code UI, the session records the equivalent of:
The selected model remains unchanged, and no selection error is shown to the user.
Expected behavior
message.agent.uri.Actual behavior