Skip to content

Test: Remote session delegation across agent hosts #337849

Closed

Description

Refs: #336690, #336682

Complexity: 5

Authors: Dmitriy Vasyura (@dmitrivMS)

Create Issue


NOTE: Windows to Windows is also ok, and more than 2 machines is better than 2.

Validate picker-free remote-session creation and two-way messaging in the Agents window. Aim for about 45-60 minutes with machines already available. Claim one row above; each tester runs the four scenarios below, not every OS/model/transport combination.

Setup

  • Every tester must use at least two distinct machines: machine A hosts the coordinating Agents window and originating session; machine B runs the remote session. VMs count as machines; two windows or multiple sessions on one machine do not satisfy this requirement. Both testers must exercise a real cross-machine round trip.
  • Use 1.140 Insiders or development builds containing the merged sessions: add remote session delegation tools #336690 on the coordinating client and agent hosts. Do not assume an older Insiders/remote-host installation has the feature yet.
  • On A, start a Copilot Agent Host conversation, not the Local harness. Enable chat.remoteAgentHostsEnabled and connect B through either SSH or an authenticated dev tunnel. One transport and one advertised Copilot model per tester are sufficient.
  • Have Git and a disposable, trusted repository on B. Record its current branch and use the isolation mode assigned above. Do not use production repositories or broaden approval settings for this test.

1. Opt-in, discovery, and matching

  • Start with chat.remoteSessions.tools.enabled explicitly false: the agent must not have the four remote-session tools. Set it to true and ask the agent to list remote hosts with list_agent_hosts. Verify B's identity, connection status, OS, memory capacity, CPU count, and advertised models match the machine.
  • Request a session with an impossible requirement, such as more memory than any connected host has. Expect a clear failure and no session creation or fallback to a nonmatching machine.

2. Cross-OS creation, replies, and follow-up

Use a non-default chat within the originating session for this scenario. For example, adapt this prompt to B's OS and known resources:

Start one remote session on a connected Linux host with at least 8 GiB of memory and two logical CPUs. Report the actual OS and the marker remote-tpi-1 back to this originating chat. Do not modify any files.

  • Verify create_remote_session selects B without a host picker, creates exactly one workspace-less session, and actually runs on B. Use one model advertised by B and confirm it is selected. The original chat remains usable while the task runs.
  • Confirm the remote agent uses send_remote_message to report back to the same originating chat, not a different chat or only the remote transcript. During one round trip, give the origin another task so a returning message queues if it is busy. Expect one delivered reply and no acknowledgement loop or repeated polling.
  • Send a short follow-up to that existing remote session and receive a second distinct marker. Use get_remote_session to verify its status/latest response without starting another turn or session.
  • Optional, only if already available: with a second eligible remote host connected, try two short tasks and check that automatic placement accounts for running sessions and pending creations. Do not provision a third machine just for this check.

3. Explicit target workspace

Ask for one small edit in B's trusted test repository, explicitly using the assigned isolation mode and the target's existing path.

  • Windows -> Linux tester: use a new worktree from an existing target-local branch. Verify the edit is in the new worktree and the source checkout/branch is unchanged.
  • macOS -> Windows tester: use folder isolation. Verify the edit is in the specified folder, with no unexpected worktree or branch switch.

In both cases, verify nothing is cloned/copied from A, normal approvals still apply, and the remote session can report the result back.

4. Disconnection and disabling

  • Disconnect B before requesting a session explicitly on B. Expect a clear unavailable-host failure, no duplicate session, and no silent local/other-host fallback. Reconnect B and send a new follow-up to the existing remote session; messaging should work again.
  • Disable chat.remoteSessions.tools.enabled while a harmless remote task is running. The tools become unavailable, but B stays connected and the task is not canceled. Observe completion in the remote session rather than expecting tool-based replies after disabling.

Report and cleanup

Record both OSes, client/host builds, transport, model, isolation mode, and any failed or blocked steps. Restore settings and remove only test-created files/worktrees. No need to exhaust creation/depth limits, create hundreds of sessions, or run an exhaustive provider/transport matrix; boundary behavior has automated coverage.

Activity

  1. removed their assignment
    on Sep 28, 2026
  2. removed their assignment
    on Sep 28, 2026
  3. TylerLeonhardt commented on Sep 28, 2026

    @TylerLeonhardt
    Member

    Very excited to use these!

  4. locked and limited conversation to collaborators on Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions