Task-led environment comparison · official GitHub docs checked Nov 3, 2026
Choose a GitHub Copilot agent environment for your repository
Choose Copilot Cloud, GitHub Actions, or a registered custom environment by checking which setup steps, runner, operating system, network, and host controls your repository needs.
Which GitHub Copilot agent environment should I choose?
Start with the constraint your task cannot work without. Choose Cloud for the managed GitHub-hosted Linux sandbox when standard setup is enough. Choose Actions when you need `copilot-setup-steps.yml`, a larger or self-hosted runner, or a Windows environment. Choose a custom environment when your team needs to own a Linux machine or Codespace, its installed tools, dependencies, and lifecycle. These are environment and setup tradeoffs, not a ranking of code quality.
What does the default Cloud environment provide?
GitHub creates and manages an isolated Linux sandbox for a cloud session; you do not provision its host. GitHub documents session snapshots and resume across supported clients. The standard repository setup workflow, larger or self-hosted Actions runners, and Windows setup are Actions-specific. Cloud and Actions are selected when a session starts, and changing the environment requires starting a new session.
When should I select GitHub Actions?
Use Actions when the repository needs the documented `.github/workflows/copilot-setup-steps.yml` workflow, a larger or self-hosted runner, or Windows. The setup workflow must contain a `copilot-setup-steps` job and be present on the default branch; GitHub runs it before the agent starts. Self-hosted runners require administrators to configure network controls, and GitHub recommends ephemeral single-use runners. Verify current compatibility and policy requirements in GitHub Docs before changing runner settings.
When does a custom environment fit?
A custom environment is a Linux machine or Codespace running GitHub's Copilot host. You prepare the workspace and install its tools and dependencies, register the host, and select it from a client that supports custom environments. Your team is responsible for the machine, tools, workspace, and keeping the host running and updated. The current setup guide uses the prerelease Copilot CLI for a Linux host; check the linked docs for availability and client support before planning around it.
Can I set environment variables in a Cloud sandbox?
A GitHub Community user asked about configuring cloud-sandbox variables in discussion #197220. GitHub's current docs describe separate Cloud customization and Actions setup controls; the documented `copilot-setup-steps.yml` workflow only runs on Actions. First check whether a Cloud customization setting meets the need. If you require repository-controlled setup steps, a particular runner, or a host you manage, compare Actions and custom environments against that requirement. The discussion is qualitative evidence of a setup question, not a measure of how often it occurs.
How do I check whether my chosen environment can push changes?
Before assigning a large task, run a small test that asks the session to change one harmless file and open or update a branch or pull request. Confirm the selected repository, write access, host connection, and session logs, then inspect the resulting diff. A GitHub Community discussion records a custom-environment push failure, so include the complete Git and authentication path in your trial rather than assuming that a connected host proves the push flow works.
How can I compare the environments fairly?
Use a disposable branch and the same small task, repository revision, and validation command. Record which environment was selected, setup changes, runner or host requirements, whether dependencies installed, and whether the change could be pushed for review. Inspect the diff and run the checks yourself. This tests fit with your repository and organization setup; it does not establish general coding quality, security, or cost superiority.
Sources
- GitHub Docs: About cloud sandboxes for GitHub Copilot · checked Nov 3, 2026
- GitHub Docs: Configure the development environment for agents on GitHub Actions · checked Nov 3, 2026
- GitHub Docs: Creating a custom environment for agents · checked Nov 3, 2026
- GitHub Community: Cloud and local sandboxes for GitHub Copilot, discussion #197220 · qualitative setup question
- GitHub Community: Custom environment session fails when pushing output, discussion #184244 · qualitative troubleshooting report
- GitHub Changelog: Work from anywhere with a new, connected Copilot cloud experience · Oct 28, 2026