remote agent sessions are filtered out as 'external'.
The Agent Host log confirms that discovery can enumerate the sessions, but classification drops them: (this was before the default external setting was changed to recent)
[Copilot] Listed 2 SDK session(s) for discoverable chats
[Copilot] Chat discovery: 2 SDK session(s) -> 0 external, ... 2 with unsupported or missing client name ...
[AgentService] listSessions computed 0 of 0 session(s) for mode 'none'
repro steps
- open a dev box use the agents window to create more than two sessions
- click the "Allow connections from other machines..." button above the sessions list
- go to insider.vscode.dev and connect to that tunnel, or connect to remote agent host from a different agents window.
🐛 only the 2 most recent sessions are shown
from copilot:
Most likely cause
#331187
External chat discovery in copilotAgent.ts currently does this for every non-adoptable session:
const clientName = s.isRemote ? undefined : s.clientName;
if (clientName === undefined || !COPILOT_EXTERNAL_SESSION_CLIENT_NAMES.has(clientName)) {
unsupportedClientName++;
return undefined;
}
The supported client names are github/cli and github/autopilot.
As a result, a session with isRemote: true is treated as if its client name were missing, even when the persisted client name identifies a supported producer. Sessions created by another remote/runtime client may likewise be excluded if that producer omits clientName or uses a different value.
This explains why the SDK catalog contains the sessions while the Web Agents session list is empty.
Suggested change
Represent and validate remote provenance explicitly instead of unconditionally discarding clientName when isRemote is true. For example:
- Preserve the SDK-provided client name for remote sessions.
- Add an explicit allowlist/classification path for supported remote session producers.
- Continue requiring a working directory, repository metadata, and the existing recency window.
- Log
isRemote, sanitized client provenance, and the specific rejection category separately so a remote-provenance rejection is not reported as a missing client name.
If remote sessions must remain excluded for trust or resume-safety reasons, the UI or logs should identify that constraint directly rather than classifying them as an unsupported/missing client name.
remote agent sessions are filtered out as 'external'.
The Agent Host log confirms that discovery can enumerate the sessions, but classification drops them: (this was before the default external setting was changed to
recent)repro steps
🐛 only the 2 most recent sessions are shown
from copilot:
Most likely cause
#331187
External chat discovery in
copilotAgent.tscurrently does this for every non-adoptable session:The supported client names are
github/cliandgithub/autopilot.As a result, a session with
isRemote: trueis treated as if its client name were missing, even when the persisted client name identifies a supported producer. Sessions created by another remote/runtime client may likewise be excluded if that producer omitsclientNameor uses a different value.This explains why the SDK catalog contains the sessions while the Web Agents session list is empty.
Suggested change
Represent and validate remote provenance explicitly instead of unconditionally discarding
clientNamewhenisRemoteis true. For example:isRemote, sanitized client provenance, and the specific rejection category separately so a remote-provenance rejection is not reported as a missing client name.If remote sessions must remain excluded for trust or resume-safety reasons, the UI or logs should identify that constraint directly rather than classifying them as an unsupported/missing client name.