Skip to content

Web Agents omits remote SDK sessions as unsupported or missing client name #332185

Description

@amunger

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

  1. open a dev box use the agents window to create more than two sessions
  2. click the "Allow connections from other machines..." button above the sessions list
  3. 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:

  1. Preserve the SDK-provided client name for remote sessions.
  2. Add an explicit allowlist/classification path for supported remote session producers.
  3. Continue requiring a working directory, repository metadata, and the existing recency window.
  4. 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.

Metadata

Metadata

Labels

agent-hostIssues for the agent-host implementation (not the protocol)

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions