← Back to news
VS Code Agent Host: Delegate Tasks Without Delegating Decisions

Photo: Sebastiaan ter Burg / Wikimedia Commons — CC BY 2.0

02/11/2026

VS Code Agent Host: Delegate Tasks Without Delegating Decisions

VS Code Agent Host: delegate execution, keep engineering control

The most useful AI development improvement is not always a stronger model. Sometimes it is removing the need to keep the same editor window open while an agent investigates a failing test. GitHub's October 28 VS Code announcement puts that change in focus: Agent Host separates supported agent sessions from individual editor windows, and remote connections let engineers work with sessions near the repository and its toolchain. The practical opportunity is less repeated setup and less babysitting, not permission to ship unattended changes.

For a senior developer, the right question is concrete: can an agent perform a bounded engineering task while I review another change, then give me a reproducible result? This guide explains the architecture, setup routes, useful assignments and operating limits. The workflows below are recommendations, not a hands-on benchmark or a claim that every account already exposes every feature. Human ownership of scope, credentials, review and release remains essential.

Understand the three moving parts

Distinguish the client, the harness and the host. The client is the interface in which you read progress and issue instructions. The harness coordinates the model, tools and workflow. Agent Host is the process that runs supported harnesses and owns their sessions. An editor window can therefore stop displaying a session without necessarily terminating its execution. This is a process-lifetime improvement, not an automatic increase in model quality.

The host runs beside the workspace: locally or on an appropriately connected development machine. File changes and commands happen there. That does not establish where model inference happens or what data leaves the machine. Review the model provider and organizational data policies separately. Also distinguish Agent Host from the extension host: editor extensions still have their own lifecycle, and tools contributed by an editor window can require that window to remain connected. A separate agent process does not magically make every extension headless.

What is new, and what is still conditional

The October announcement describes background execution, remote machines, continuity between editor and Agents windows, and access from other Copilot clients. The documentation is more granular: GitHub Environments is labeled Preview, some remote-management functions are Experimental, and client capabilities vary. Treat the release announcement as the direction and the current documentation plus your installed build as the operational contract.

Do not collapse three different promises into one. A session can outlive a project window; that does not mean a desktop-managed host survives quitting VS Code. A remote session can outlive your laptop's connection; that does not mean it survives shutting down the remote host. A provider-managed cloud session is another execution choice, not the same thing as registering your own machine. Before adopting any route, record the build, account entitlements, organization policy and connection method in your team runbook.

Install and establish a safe first session

Download VS Code from the official download page, choosing the package for your operating system and architecture. Use the documented Copilot setup flow and sign in with an authorized account. Confirm that the account and organization permit the desired harness and remote capabilities. Enterprise-managed Copilot settings can disable Claude and Codex harnesses; a common host does not override those restrictions.

Start with a disposable repository or a clean branch, not a working tree containing unrelated edits. Open the Agents window, select the intended workspace and available host-backed harness, and give a read-only repository-mapping task. Ask for the build command, test locations and entry points, with file references. Compare the answer with the repository before authorizing edits. This establishes whether the session has the right workspace and tools without immediately risking application behavior. Not every existing session uses Agent Host: the Local harness and older extension-host sessions have different lifetime characteristics.

Choose a connection instead of improvising one

For a development server already reachable over SSH, the Agents window can connect through its SSH environment option. The remote machine needs the repository and required development tools; connecting does not clone your project or transfer an existing local session. Use a dedicated development account and follow your normal SSH access controls.

For cross-client access, GitHub Environments registers an existing machine with your GitHub account. The host and connecting client must use the same account, sharing must be explicitly enabled, and organizational policy may restrict the feature. The announcement documents the command code agent host --github-environment from the project folder; current documentation also describes the Remote Connections menu. Use the route supported by your build. For a standalone host, code agent host starts a localhost server protected by a connection token. Authenticated dev tunnels are another documented route; never turn a convenience tunnel into anonymous access to a credentialed development machine.

Prove continuity before trusting background work

Run a harmless, bounded task in a test repository, such as identifying slow test groups without editing files. Close the project window or disconnect the client in the way you intend to use daily, while keeping the owning application or standalone host running as required. Reconnect to that exact host and existing session. Check the transcript, command output and repository state rather than treating a visible conversation as proof of continued execution.

Repeat with a task that needs an editor-contributed tool. This exposes an important failure mode: the host can remain alive while a required client tool becomes unavailable. Build a small capability checklist listing filesystem access, terminal commands, test runner and any extension or browser dependencies. If unattended work relies on a window-specific tool, keep that client connected or redesign the task to use an approved host-side tool. Background operation is only useful when its prerequisites actually remain available.

Use case: investigate a failing test without taking over your desk

A strong first assignment is a reproducible CI failure. Give the agent the failing test identifier, relevant log excerpt, expected behavior and permitted directories. Request a diagnosis before a patch: locate the code path, reproduce the failure and distinguish application behavior from environment problems. Forbid broad dependency upgrades and unrelated formatting changes.

The deliverable should include the exact reproduction command, observed output, a minimal failing regression test where appropriate, the proposed change and a rerun of the relevant checks. An existing remote development machine can keep this investigation close to its dependencies while your workstation remains available for review. The human decision is whether the proposed behavior is correct, not whether the agent produced a plausible explanation. If reproduction fails, require that limitation explicitly instead of accepting an invented successful test run. The productivity gain is reduced setup and waiting, not certainty of a correct diagnosis.

Use case: repository reconnaissance before a change

In an unfamiliar service, delegate a read-only map before implementation. Ask the agent to trace one request from routing through validation, persistence and error handling. Require file paths, symbols and the tests that exercise the path. Ask it to identify uncertain assumptions separately from facts visible in the checkout.

This is especially valuable when the codebase needs a heavyweight toolchain on a shared development host. You can inspect another review while the agent collects context, then challenge its map before changing code. The output is a navigational aid, not architectural authority. Reject unsupported claims such as an endpoint being unused merely because a text search found no callers. Dynamic dispatch, external consumers and generated code need additional evidence. A useful stop condition is a short impact map and three unresolved questions, rather than an open-ended request to understand the entire repository.

Use case: bounded refactoring and dependency preparation

Give mechanical work a narrow contract. For example, ask the agent to replace a deprecated API within one package while preserving public behavior. Supply the target API documentation, excluded directories and acceptance tests. First request an inventory of call sites; approve the migration plan before editing. Keep semantic redesign out of the same patch.

A dependency update can follow the same pattern: inspect release notes, identify breaking surfaces, modify the smallest necessary scope, and run targeted tests before the broader suite. Pin the intended version and prohibit changing the lockfile merely to make unrelated failures disappear. If several sessions operate concurrently, use separate worktrees or otherwise isolated branches with clear ownership. Agent Host provides session infrastructure, not a guarantee against two agents writing the same files. The reviewable unit is still the diff, its rationale and the evidence that the behavior remains acceptable.

Use case: prepare a review, not an automatic verdict

Ask a separate session to examine a proposed diff for missing edge cases, compatibility risks and tests that would disprove its assumptions. Feed it the intended behavior and repository conventions, not just the patch. Require each finding to identify the location, failure mechanism and a concrete way to verify it. Keep speculative concerns clearly labeled.

This can shorten the reviewer's preparation, especially when the host can run the relevant checks. It does not create independent assurance merely because a second model or session comments on the first. Both can share the same mistaken assumptions. The engineer should verify important findings and decide whether a tradeoff is acceptable. Do not let the agent approve or merge its own work through a broad GitHub credential. Keep protected branches, required checks and reviewer rules in place. Session continuity helps carry evidence between interfaces; it does not replace the repository's governance.

Write a task contract that makes stopping possible

A useful prompt names the goal, the workspace, allowed modifications, forbidden actions, evidence required and stop conditions. For a payment-service defect, that could mean: reproduce the rounding failure in the specified test, propose the smallest correction, do not change currency policy, do not access production, and stop if a schema migration appears necessary. Ask the agent to report blockers rather than expanding its own authority.

Define what completion means before execution: relevant tests passed with recorded commands, no unrelated files changed, known limitations listed, and no merge or deployment. Also set a time or usage budget appropriate to your environment. If the investigation exceeds it, request an interim report. Persistent sessions make it easier to let work continue; explicit stop conditions prevent that convenience from turning into uncontrolled churn. A longer transcript is not a better engineering result.

Treat remote access as privileged access

GitHub Environments is not merely a chat-history sync feature. The documentation warns that connected clients receive trusted-owner access to host sessions, tools and workspace resources. Session actions are mirrored to GitHub for catalog and history storage, and conversation content is not end-to-end encrypted. Review those properties before sharing a machine containing sensitive source code or credentials.

Use least-privilege development identities and avoid production secrets on the agent host. Require authentication for tunnels, review account security and decide who can register machines. Keep approval settings deliberate; broad auto-approval combined with remote access increases the blast radius of a compromised account or misleading instruction. Repository text, issue comments and tool results are untrusted inputs, not authority to exfiltrate files or change security settings. A process boundary is not a sandbox, and sandboxing tool execution does not by itself settle model data handling.

Separate disconnecting, stopping and revoking access

Three operational actions have different meanings. Disconnecting a client ends that connection but does not stop running tasks. Turning sharing off removes remote access but is not a cancellation instruction. Stopping the agent task must happen through the session's controls. Document these distinctions so an engineer can halt a problematic command instead of merely hiding its progress.

For a pilot, rehearse cancellation on a harmless task and verify the resulting process and repository state. Record who owns a long-running session and who handles an unavailable host. When a machine is retired or an engineer leaves, review registrations, credentials and tunnels using the organization's normal offboarding process. A visible offline environment is not proof of revoked access, and deleting a registration is not the same as deleting workspace files. Operational clarity matters more once execution is no longer tied to the window directly in front of you.

Measure the workflow instead of buying the narrative

Evaluate comparable tasks before and after adoption. Track elapsed time to a reviewable patch, active human preparation time, review effort, failed checks, rework and model or compute usage. Separate time saved in environment setup from time saved in implementation. A background task that finishes quickly but needs extensive correction may reduce neither delivery time nor engineering attention.

Use a small pilot with repository mapping, one reproducible bug and one mechanical migration. Keep task difficulty and acceptance criteria comparable, and record cases where the tool is slower or blocked. Do not present a percentage productivity gain without measurements. The credible benefit is the ability to overlap bounded machine work with useful human work and resume context without rebuilding it. Whether that benefit outweighs access management and review overhead is a local engineering question. The host's persistence is an enabling capability, not a business result by itself.

A practical adoption checklist

Before expanding the pilot, confirm the host, workspace, harness, model provider and account for each session. Verify the documented connection route on the installed build. Test what happens when the client disconnects and when a required extension disappears. Keep independent work isolated, limit credentials and require evidence-backed completion reports. Preserve the same review and release gates used for human-authored changes.

The official links in the sources section cover downloads, architecture, remote setup and approvals. Start there rather than copying undocumented flags from a discussion thread. Agent Host is interesting because it changes where an agent can keep working and how you reconnect to it. The engineering principle stays familiar: delegate a bounded task, inspect observable results and keep consequential decisions with the people responsible for the software. Less window management is useful. Less accountability is not.