GitHub Copilot Agent Host: Do Tasks Stop on Disconnect? 2026

Confirmed behavior: GitHub says a remote Agent can keep working after you disconnect locally or close VS Code, provided the remote Mac and Agent Host keep running. A local disconnect does not necessarily stop the task, but it does not prove the task finished. If the Mac sleeps, shuts down, or the Agent Host stops, reconnect and verify the session and project results instead of assuming work continued.

This guide is for developers using VS Code Remote SSH who need to leave a Copilot task running on a remote Mac. It also helps macOS CI engineers checking a host’s actual state, and team leads who need to separate an Agent session from a passing Xcode build.

Last updated: October 28, 2026. We checked the behavior against the VS Code Agent Host documentation, the remote Agent session guide, and the GitHub Copilot in VS Code release notes.

Start by separating the client from the remote task

There are several things that can look like “the Agent disconnected,” but they do not mean the same thing:

  • Local VS Code: The window and interface on your workstation. Closing it removes your current view of the work.
  • SSH connection: The route your local client uses to reach the remote Mac. Losing this connection means you may no longer be able to interact with the host through that route.
  • Remote Mac: The machine where the remote work runs. Its availability is separate from your local VS Code window.
  • Agent Host: The remote execution component that supports the Agent session. GitHub documents that the remote machine and Agent Host must keep running for the remote task to continue.
  • Agent session: The record and status of the Agent’s work. A session you can see is useful evidence, but it is not the same as a verified code change.
  • Project acceptance: The checks that establish whether the resulting code builds, passes tests, and meets your project’s requirements.

The Agent Host architecture documentation describes where remote work runs and its requirement for the host to remain active. The remote session documentation explains how to manage remote sessions. Use those boundaries to interpret what you see: losing the client view is not the same observation as stopping the remote executor.

A practical consequence follows: do not use the VS Code window as your only health check. It answers whether your local interface is connected. It cannot, by itself, tell you whether the remote task is still running, has ended, or has produced acceptable work.

Diagnose which connection or process changed

When the screen stops updating, first identify the layer that failed. Avoid restarting the task until you have checked whether it is still active; otherwise, you can create duplicate work or overwrite changes.

Check the local client

If VS Code closed or became unresponsive, reopen it and reconnect to the same remote environment. Look for the relevant Agent session rather than starting a replacement immediately. The Agent session documentation distinguishes session records from the client view, which is why a missing local window alone is not enough to classify the task as failed.

Record what you can observe: whether the remote workspace opens, whether the session appears, and whether it reports a current or completed state. If you cannot reach the session, note that the state is unknown; do not label it “stopped” based only on an unavailable interface.

Check the Remote SSH route

If VS Code is open but Remote SSH cannot reach the Mac, check the SSH connection and the host’s availability separately. A failed connection tells you that the client cannot currently reach the machine through that route. It does not prove that the Agent Host stopped, and it does not prove that the Agent continued.

Once access returns, reopen the relevant session and inspect its recorded state. If you use terminal access, verify that you are on the expected host and in the expected repository before running commands. A connection can be restored to the wrong machine or workspace, which can make an otherwise useful check misleading.

Check the Agent Host and remote Mac

If you can reach the host, confirm that it is available and that the Agent Host is running. GitHub’s documented condition is explicit: remote work can continue after a local disconnect only while the remote machine and Agent Host remain running. The documentation does not justify a broader promise about what happens after every host interruption or how a task will recover.

Important: Treat “the interface is offline” as “the interface is offline.” Do not turn that observation into a claim about remote task status until you have checked the session or the project itself.

The GitHub release notes are another place to confirm the described feature behavior. Recheck the current documentation if your VS Code or Copilot version differs from the release context you are using; do not infer support for a particular setup from a label in the interface alone.

Handle sleep, shutdown, and network loss as different cases

A remote Mac that is unavailable may be asleep, shut down, isolated by a network problem, or reachable while its Agent Host has stopped. Those conditions are not interchangeable. The documented requirement to keep the remote machine and Agent Host running is a reason to investigate them separately—not a basis for promising that a task will resume after any one of them.

For each incident, write down the last known state before taking action:

  • Was the Mac reachable immediately before the disconnect?
  • Did the machine enter sleep or shut down, or is its power state unknown?
  • Is the network path unavailable while the machine itself may still be running?
  • Can you reach the host, and is the Agent Host active?
  • Can you reopen the same Agent session, or is only the local workspace visible?

These checks keep you from confusing an access problem with an execution problem. If the Mac is asleep or off, restore the host first. Then inspect the Agent session and project state. If the Agent Host is no longer running, do not assume the interrupted task has a guaranteed continuation path; review what is already present before deciding whether to resume or rerun it.

Recommended action: When task continuity matters, arrange for the remote Mac and Agent Host to remain running for the whole job, then verify the result after reconnecting. If you cannot ensure that condition, plan for recovery rather than treating disconnect survival as guaranteed.

Use these answers to classify a disconnect

Will Copilot keep working after VS Code closes?

It can, if the task is running in a remote Agent Host session and both the remote Mac and Agent Host keep running. Closing the local window is not proof of either success or failure. Reconnect to the same remote session and check its state, then verify the repository changes before treating the task as complete.

Does Remote SSH dropping mean the Agent stopped?

No conclusion follows from the SSH drop alone. It means the client lost its route to the remote Mac. The Agent may or may not still be working; check host availability and the session when access returns. If you can reach the Mac, check the Agent Host as well. Do not start another task until you know whether the first one left changes behind.

Can the task continue while the remote Mac sleeps?

Do not assume so. The documented condition is that the remote machine and Agent Host remain running. Sleep, shutdown, network loss, and a stopped Agent Host are different states, and the cited sources do not define a universal recovery result for all of them. After restoring access, inspect the session and repository before deciding whether to continue or rerun the work.

How do you tell whether a remote Agent is still running or failed?

Reconnect to the remote environment and inspect the same Agent session for its current state or completion record. Then inspect the repository for the intended changes. If the session cannot be reached, mark the task state as unknown rather than failed. Finally, run the project’s own checks: a visible session or completed status does not establish code correctness.

Verify the work before reporting completion

An Agent session can show progress or a completion state, but neither replaces a review of the project. Start with the session record, then examine the repository. In a Git working tree, git status helps identify changed, staged, and untracked files; consult the Git status reference for the command’s documented output. Compare those changes with the task request and inspect the diff before accepting them.

A reliable recovery sequence is:

  • Reconnect to the intended remote Mac and repository.
  • Open the original Agent session and record its visible state.
  • Check the working tree and inspect the relevant diff.
  • Confirm whether the expected files and outputs exist.
  • Run the project’s required build and tests.
  • If the checks fail or the expected changes are missing, decide whether to repair, resume, or rerun only after reviewing the current state.

That order matters. Rerunning first can obscure whether the original session made partial changes. Checking the repository before relying on a session label gives you a second, project-level source of evidence.

For an Xcode project, treat Agent completion and Xcode acceptance as separate gates. Apple’s Xcode build and run guide covers building and running an app; its Xcode testing guide covers running tests. Use the checks that match the project, target, and delivery requirements. An Agent Host does not certify that a build succeeded, tests passed, or an artifact is ready to ship.

Choose the next action from the evidence

What you can verify What it tells you Next action
VS Code closed, but the remote Mac and Agent Host remain running The documented continuation condition may be satisfied; task completion is still unverified Reopen the remote session and inspect its state
Remote SSH cannot connect and host status is unknown You have lost access, not established the task state Restore the route or host access, then check the session
The Mac is asleep, shut down, or unreachable The documented “keep running” condition is not established Restore availability and inspect before resuming
Session reports completion and repository contains expected changes Work may be ready for review, but code quality is not established Review the diff and run project checks
Xcode build or tests have not been run Agent activity has not passed project acceptance Run the required Xcode workflow on macOS

The table is a triage aid, not a guarantee about recovery behavior. In particular, a remote host being reachable does not by itself establish that the correct Agent session is active, and an ended session does not establish that its output is correct.

Prepare the host and acceptance path before leaving

Before starting work you may need to leave unattended, make the task recoverable:

  • Confirm that the task is running in the intended remote Agent Host session, not only in a local view.
  • Confirm that the remote Mac and Agent Host are active, and avoid planned sleep or shutdown during the task.
  • Make sure you know how to reconnect to the same remote workspace and session.
  • Keep the task scope reviewable. Ask for changes that can be inspected in the repository rather than relying on a conversational “done.”
  • Define acceptance before the run: expected files, build target, tests, and any artifact the team must receive.
  • After reconnecting, check the session, repository, and project validation in that order.

If your team already uses a persistent macOS CI machine, its maintenance plan should distinguish runner health from job results. Our guide to checking a self-hosted Mac runner before a CI job covers host and workflow checks. For a new remote setup, review the remote Mac getting-started guide and confirm that your access and recovery process matches your project.

Option What it helps with Main limitation to account for
Local VS Code with a local Mac Direct access to the machine and project Work depends on that Mac staying available and may tie up your development hardware
Linux or Windows development host Useful for workflows that do not require macOS-specific tools It cannot replace a macOS execution environment when the project requires Xcode
Remote Mac with VS Code Remote SSH Separates your local workstation from the Mac running the project Requires network access and a running remote Mac and Agent Host; reconnecting still requires result checks
Remote Mac used only when needed Avoids buying a Mac solely for occasional or temporary work Availability and continuity depend on the chosen access arrangement; it is not a substitute for planning host uptime

If your current setup relies on a local machine that must stay open, a Linux host that cannot perform the required macOS work, or an SSH route that has no recovery plan, moving the execution environment to a remote Mac can address those specific constraints. It does not remove the need to check session state, repository changes, and Xcode results. For temporary macOS development or validation work, renting a remote Mac from rebootmini can provide access without buying a Mac; compare that option with owning a machine if your workload is continuous, needs physical interfaces, or requires a host you control directly.

Frequently asked questions

Will GitHub Copilot keep working after I close VS Code?

It can continue when the task is running in a remote Agent Host session and the remote Mac and Agent Host remain running. Closing the local VS Code window alone is not proof that the task stopped, and it is not proof that the task finished. Reconnect to the remote session and inspect its status and the repository before relying on the result.

Does a Remote SSH disconnect stop a Copilot task on a Mac?

Not necessarily. A broken SSH connection means your local client can no longer reach the remote environment; it does not by itself establish the Agent Host or task state. Check whether the remote host is available, reopen the relevant Agent session, and inspect the repository for changes. If the host or Agent Host has stopped, do not assume the task continued.

Can an Agent Host task continue while the remote Mac is asleep?

Do not assume that it can. The documented continuation condition is that the remote machine and Agent Host stay running. Sleep, shutdown, network loss, and a stopped Agent Host are separate conditions, and the cited documentation does not establish a universal recovery outcome for each. Restore access, check the session, and verify project artifacts before resuming or rerunning work.

How can I tell whether a disconnected remote Agent is still running or failed?

Treat the disconnected interface as a visibility problem until you gather evidence. Reconnect, inspect the Agent session for its current state or completion record, and check the project repository for expected changes. Then run the project’s own validation. A session that remains visible or reports completion does not prove that the code is correct or that an Xcode build and tests passed.

Further reading

Run Your Agent Workflow on a Dedicated Remote Mac

Rent a dedicated Apple Silicon Mac from rebootmini with 16GB, 24GB, or 64GB of unified memory.

Verify your experiment requirements

Compare model size, unified memory, and billing period, then choose a dedicated physical machine.