Cloud agents vs local agents: what is the difference?
A cloud agent runs your coding agent on a clean cloud machine. We read five tools’ docs on how it differs from a local agent and which work to send it.
Summary. If you use a coding agent on your own computer, you have probably heard that the same agent can also run in the cloud: you start it from an issue, from a comment on a pull request or from your phone. This post explains what an agent running in the cloud is, where it parts ways with the local one, and which work to give to which. On 4 November 2026 we read the documentation of Claude Code, OpenAI’s Codex, GitHub Copilot, Cursor and Google’s Antigravity, two peer-reviewed studies of the pull requests agents open, and the figures Cursor itself has published.
- A cloud agent moves the agent loop from your machine to a clean one. The model and the loop stay the same; what changes is the machine the code runs on, that the work starts from the repository, and that it leaves a branch or a pull request behind. Not every agent you steer from your phone is a cloud agent: Claude Code, Copilot and Antigravity document that as a separate feature.
- Your local settings don’t go to the cloud; what you commit does. Each tool hands over secrets its own way, and the network default differs too: in Cursor the internet is open, while in Claude Code and Copilot it is limited by an allowlist. Parallel tasks put no load on your computer, but they come out of your quota.
- Agree on permissions before you turn a cloud agent on. Who can start the agent, which repositories and addresses it can reach, which secrets it sees and who approves its pull request all vary from tool to tool. An instruction hidden in an issue can steer everything the agent does with those permissions.
- Send the cloud well-defined work that has tests. In a study published at MSR 2026, of 33,596 pull requests opened by agents, 84% of documentation tasks were merged, against 55% of performance tasks. Keep work that is vague, tied to your machine or something you want to learn on your own machine; GitHub’s and Anthropic’s guides recommend the same.
What is a cloud agent?
In the git worktree post we covered agents working in parallel on one computer, and in the sandbox post what limits an agent’s commands. In both, the agent ran on your machine. A cloud agent is the same agent running in the cloud instead of on your computer, on a clean machine started for each task. This post covers how the two differ, what five tools offer today, and which work to give to which.
The vendors describe it in much the same words. Claude Code’s documentation puts the difference in one sentence: Claude Code behaves the same everywhere; what changes is where the session runs and whether your local configuration is there. Cursor also writes that cloud agents use the same agent fundamentals, only in isolated virtual machines in the cloud. A task in the cloud goes through these steps:

Each step changes a habit from local work. The repository arrives as a clean clone, so the settings on your machine aren’t there. A setup script prepares the environment, not you. The agent mostly runs commands without asking you: Cursor writes that its cloud agent runs every terminal command on its own, while the local agent asks for approval for each one, and Antigravity’s remote agent doesn’t ask either unless you change the setting. When the work is done, what you have is a branch or a pull request, not changes waiting on your disk.
One mix-up is worth clearing up first: not every agent you steer from your phone is a cloud agent. Claude Code’s Remote Control, Copilot’s Agent Host in VS Code and Antigravity’s Remote Control let you steer the agent from a phone or a browser, but the agent still runs on your machine, and the machine has to stay on. With a cloud agent you can shut your computer down; the work carries on in the cloud.
Cursor gives an example of how much a vendor uses these agents in its own work. By the company’s own figures, cloud agents created more than 30% of the pull requests Cursor merged as of 24 February 2026, and more than 60% as of 2 September 2026. These are Cursor’s figures for its own repository, and it doesn’t say how many pull requests they were computed over.
What changes when an agent moves to the cloud?
The model and the loop stay the same, so the differences are in everything around the agent. Five of them show up in day-to-day work:
| What changes | Local agent | Cloud agent |
|---|---|---|
| The machine the code runs on | Your computer: your files, your network, your VPN, your browser sign-ins | A clean machine on the vendor’s or your company’s servers; it can’t see the files on your computer |
| Environment and setup | Everything you have installed is ready | What you committed to the repository comes along; a setup script installs the packages |
| Secrets and network | The variables in your shell and your own network | Only the secrets you give the environment; the network is open or limited by an allowlist, depending on the tool |
| Parallel work | A separate worktree for each agent; the CPU and memory are your computer’s | Each task on its own machine; you can shut your computer down |
| Cost and limits | Usage on your plan or your API key | Usage on the same plan; parallel tasks use up the quota faster, and the machine has a set size |
Source: the cloud documentation of Claude Code, Codex, GitHub Copilot, Cursor and Antigravity, 4 November 2026. The details, tool by tool, are below.
Codex’s documentation states the first difference most plainly: a cloud task uses only the files and services of its cloud environment; your computer’s files, running processes, browser sign-ins and VPN access aren’t passed to it automatically. GitHub likewise writes that the commands Copilot runs in a cloud sandbox can’t read or change the files on your computer. The machine may also be less powerful than yours: Claude Code’s cloud machine comes with about 4 vCPUs, 16 GB of RAM and 30 GB of disk, and on Codex the machine on the Plus plan has 2 vCPUs and 8 GiB of memory. For work beyond these limits, Anthropic recommends running Claude Code on your own hardware.
The second difference is the environment. What you set up on your computer doesn’t go to the cloud; what you commit to the repository does, and four tools’ documentation says so, each in its own words. Claude Code doesn’t carry over your personal settings under ~/.claude/ or the MCP servers you added only on your own machine; Cursor doesn’t run the hooks in ~/.cursor/hooks.json, because the cloud machine can’t reach your home directory; Codex doesn’t sync your personal skills; Antigravity doesn’t load the MCP servers, plugins and skills installed on your machine in a remote session. Copilot, for its part, brings your personal instructions and skills from a dotfiles repository. Subagents defined in the repository work in a Claude Code cloud session just as they do locally.
A setup step prepares the rest: in Claude Code, the environment’s setup script; in Copilot, copilot-setup-steps.yml, which runs in GitHub Actions; in Codex and Cursor, an environment that the agent sets up after looking through the repository, and that you save. Cursor explains why this matters with a comparison: not setting up a development environment for cloud agents is like not giving your engineers a computer. An agent that can’t run tests can’t check its own work.
The third difference is secrets and the network. By secrets we mean values that must stay hidden, such as API keys, tokens and passwords. Locally, the agent sees every variable in your shell. In the cloud it sees only what you give the environment, and each tool hands that over differently. In Claude Code and Codex, if you add a key as a network secret, the key never enters the machine; a proxy in between adds it to a request on its way to an address you allowed. In Copilot, secrets reach the agent as environment variables; in Cursor too, but a value marked as a Runtime Secret is redacted from the transcript, the tool output and commits. The details are in the table below.
The last two differences go together. Locally, running agents in parallel means separate folders and your computer’s CPU, as we described in the worktree post. In the cloud, each task runs on its own machine; Cursor writes that you can run as many agents in parallel as you like, and your computer doesn’t even need to stay online. The quota, though, comes from the same place: in Claude Code, cloud sessions count toward your plan’s usage limits, and parallel tasks use them up proportionately faster; in Codex, cloud tasks draw on the same allowance as local messages and, according to OpenAI, may use more of it.
How do cloud agents work in the five tools?
We read the five tools’ cloud agent documentation on 4 November 2026. First, where the agent is started from, where it runs and what it leaves behind:
| Tool | Started from | Runs on | Leaves behind |
|---|---|---|---|
| Claude Code | claude.ai/code, the Claude mobile and desktop apps, claude --cloud; as a scheduled task, on a schedule, an API call or a GitHub event (research preview) | A virtual machine Anthropic manages; on Team and Enterprise, your own servers (public beta) | A branch on GitHub; you open the pull request from the session |
| Codex | ChatGPT on the web, mobile and desktop, the CLI; a @codex comment on a pull request; Slack and Teams on Enterprise | A separate cloud machine for each task | Changes and test results; you ask for the commit or the pull request |
| GitHub Copilot | Issues and the Agents tab on github.com, GitHub Mobile, VS Code and other IDEs, the Copilot app, copilot --cloud, the REST API, Slack, Teams, Jira, Linear; automations on a schedule or triggered by events | GitHub’s cloud sandbox, a GitHub Actions runner (which can be your own) or a Linux machine you register | A branch; at most one pull request per task |
| Cursor | The Cursor desktop app, cursor.com/agents, the iOS app, Slack, Linear, a @cursor comment on GitHub or Bitbucket, the API | A separate virtual machine for each agent; with Self-Hosted Machines, the commands run on your machine | A branch and a pull request; screenshots, videos and logs |
| Antigravity | The Antigravity app, antigravity.google.com, agy --remote-agent | An isolated remote environment Google manages | Not stated in the documentation |
Source: the tools’ documentation and release notes, 4 November 2026. “Not stated in the documentation”: we found no sentence saying so on the pages we read that day. Antigravity’s remote agent is rolling out gradually. OpenCode’s documentation describes no agent that runs in the cloud; the GitHub integration in its v1 documentation runs the agent on your own GitHub Actions runner when a comment says /opencode. Jules, Google’s asynchronous coding agent, becomes read-only after 11 November 2026 and shuts down on 31 December 2026, according to Google’s announcement of 29 October 2026.
The tools part ways on how the agent is started. In Copilot, Cursor and Codex, a comment on a pull request or an issue can start it. In Claude Code, that job falls to a scheduled task tied to a GitHub event, or to an @claude mention in a comment that a GitHub Actions workflow answers; the workflow runs in your repository’s own workflows. If you want the work to run on your own infrastructure, three tools have a way: you can run Copilot on your own Actions runner or on a Linux machine you register, and Claude Code on your own servers on the Team and Enterprise plans; in Cursor, the loop and the model stay with Cursor while file edits and commands run on your machine. For your own runners, GitHub recommends single-use runners that aren’t reused across jobs.
On the network, secrets and pricing, the differences are bigger:
| Tool | Network, by default | Secrets | Pricing |
|---|---|---|---|
| Claude Code | Trusted: package registries, GitHub and the domains on the allowlist. You can also choose None, Full or your own list | Network secret: the key doesn’t enter the machine; the proxy adds it to the request. Anyone who uses the environment can read its environment variables | On the Pro, Max, Ultra and Team plans; counts toward the plan’s usage limits, with no separate charge for the machine |
| Codex | You choose when you set up the environment: full access or an allowlist. In the legacy version that @codex comments use, it is off while the agent runs | Network secret: the program gets a placeholder, and the proxy adds the real value for allowed addresses | On Plus, Pro, Business and Enterprise; draws on the same allowance as local messages. Not available with an API key |
| GitHub Copilot | Firewall on; the recommended allowlist lets through package registries and container registries | Agents secrets reach the agent as environment variables; those starting with COPILOT_MCP_ go only to MCP servers | Model usage from AI credits; sandbox or Actions run time from the account’s included usage, and overage is billed |
| Cursor | Internet on; it can be narrowed to an allowlist | A Runtime Secret stays an environment variable, and its value is redacted from the transcript, the tool output and commits | On Premium and higher, Teams and Enterprise; from the plan’s usage at the chosen model’s rate, with a spend limit required on first use |
| Antigravity | Not stated in the documentation | OAuth tokens for the services you connect are stored encrypted and added at request time | On Google AI Pro and Ultra, with a personal account; how it is billed is not stated in the documentation |
Source: the tools’ documentation and pricing pages, 4 November 2026. In Claude Code, Enterprise users can also use it with a premium or a Chat + Claude Code seat. Copilot’s new “Copilot in the cloud” experience has been on paid plans since 28 October 2026. “Not stated in the documentation”: we found no sentence saying so on the pages we read that day.
The biggest difference is the network. Cursor’s security documentation puts two things side by side: the agent has internet access by default, and it runs every terminal command without asking. According to the documentation, prompt injection can then lead the agent to upload code to a malicious website; Cursor’s advice is to narrow the network to an allowlist. An allowlist doesn’t cover everything either: according to GitHub, Copilot’s firewall applies only to processes the agent starts from its own shell; it doesn’t apply to MCP servers or setup steps, and GitHub doesn’t consider it a comprehensive security solution.
Whose permissions does a cloud agent run with?
A local agent runs as your user, with your keys. With a cloud agent, the question splits into three: who can start the agent, whose name it commits under, and how far its permissions reach.
On starting, GitHub writes that only users with write access to the repository can run Copilot, and that comments from users without write access are never shown to the agent. In Cursor, the agent can’t reach more repositories than the person who started it already could. Claude Code’s scheduled tasks belong to your account: everything the task does on GitHub appears as you, and its commits and pull requests carry your GitHub user.
Who authors the commit depends on the tool as well. Copilot’s commits are authored by Copilot, the developer who started the work is added as co-author, and the person who asked for the work can’t approve that pull request. Cursor commits on GitHub as Cursor Agent and adds the person who started the agent in a Co-authored-by line; work started by service accounts, such as automations, gets no such line. Commits from a Claude Code cloud session carry the session’s address as a git trailer.
Each tool limits what the agent can do in a different place. Copilot can push only to the copilot/ branch created for it, or to the branch of the pull request it was called on; it can’t approve or merge its own pull request, and CI doesn’t run on that pull request until someone with write access approves it. In Claude Code, your GitHub credentials never enter the machine; the proxy in between rejects branch deletions and tag pushes, but doesn’t limit which branches can be pushed to, and for that the documentation points to branch protection rules on GitHub.
All of these permissions can be steered by a piece of text. As we described in the prompt injection post, an agent may follow an instruction in an issue or a comment it reads. Codex’s documentation shows what this looks like in the cloud with an example: you ask the agent to fix an issue, and the issue hides an instruction; if the agent follows it, your last commit message can end up on the attacker’s server. The documentation’s conclusion is to keep the agent’s internet access as limited as possible. GitHub removes hidden text in issues and comments (HTML comments, for example) before passing it to the agent. And in OWASP’s 2026 list, Excessive Agency, third on the list, traces the problem to three roots: excessive functionality, excessive permissions and excessive autonomy.
Before you turn a cloud agent on for a team, talk through these four questions. For each one, at least one of these tools documents a setting that answers it:
- Who can start the agent? Copilot doesn’t show the agent comments from users without write access, and by default its automations ignore events those users trigger.
- Which repositories and addresses can the agent reach? Claude Code tells you to scope repositories, the environment and connectors to what the task needs. For the network, Claude Code, Copilot, Cursor and Codex have an allowlist.
- Which secrets does the agent see? Use network secrets, which keep the key off the machine (Claude Code, Codex), or Runtime Secrets, whose value is hidden (Cursor). Cursor recommends OIDC tokens over long-lived access keys for cloud accounts.
- Who approves the pull request? A person should approve the pull request an agent opens. Copilot enforces this by default: the person who asked for the work can’t approve it, and if the repository already requires an approval, an agent’s pull request attributed to nobody needs one more. Cursor also writes that nothing is merged until a person has reviewed it.
Which work goes to the cloud, and which stays local?
The vendors’ guides are close on this question. GitHub recommends the Copilot app, the CLI or the IDE when you want to guide the work closely, and the cloud agent when you want to hand off a well-defined task and review the result later. Claude Code gives the cloud parallel tasks, repositories that aren’t on your computer, and well-defined tasks that don’t need frequent steering, and keeps local the work that needs your local configuration, tools or environment. Antigravity recommends the remote agent for repository tasks and for work that carries on while you are away, and your own machine for work that needs local hardware, a local server or uncommitted changes.
The measurements point the same way. A study published at MSR 2026, a software engineering conference, looked at 33,596 pull requests opened by five agents in GitHub repositories with more than 100 stars. According to the paper that introduced it (a preprint, not peer-reviewed), the AIDev dataset the study used finds these pull requests by the trace each agent leaves: the branch prefix for Codex, Copilot and Cursor, the bot account for Devin, and the co-author line for Claude Code. The merge rate varied by type of task:

According to the study, the pull requests that weren’t merged changed more lines and more files, and failed the project’s CI more often. The authors picked 600 rejected pull requests to examine by hand (38 of them could no longer be reached). Of these, 228 had been closed without any reviewer engaging, 142 repeated work already done in another pull request, and 99 had failed on a CI or test error. To do better, the authors write, agents need to split work into small, localized changes, notice work that is already under way, and pass CI before they open a pull request.
A second study on the same dataset also found the task type decisive: across 7,156 pull requests, 82.1% of documentation tasks were accepted, against 66.1% of new features. The authors read the gap as a sign that agents do better on well-defined work, but note that a looser review of documentation could also explain it. So these numbers tell you which work gets merged more easily, not what agents do better.
That is why the decision follows the shape of the work, not the tool:

- Send to the cloud: work with a clear definition, known acceptance criteria, and tests or CI. GitHub recommends simple tasks to start with: fixing bugs, changing the interface, improving test coverage, documentation, technical debt. In the study, documentation, CI and build tasks were merged most easily, while bug fixes came in below average; if you hand over a bug, write the acceptance criteria too, as GitHub says, for example which test has to pass. Start several independent tasks in parallel; each stays on its own branch, and you read the result in the pull request.
- Plan locally, then send the work to the cloud: large tasks that can still be planned. Claude Code’s advice is to agree on the approach locally in plan mode first, commit the plan to the repository, and have a cloud session carry it out. Copilot also has a step before the pull request for researching the repository, making a plan and trying changes on a branch.
- Keep local: work that is vaguely defined or broad in scope; work that involves security, authentication or personal data; work that needs your machine, your VPN, your local server or your uncommitted changes; and topics you want to learn. GitHub recommends doing these yourself. Cursor’s prerequisite comes to the same thing: the repository should run without needing services a virtual machine can’t reach, because what is hard for a developer to test locally is hard for the agent too.
A code review that runs on its own when a pull request opens is a cloud agent too, and the same questions apply to it. Our AI code review tool, diffox, clones the repository fresh from GitHub into a new temporary folder for every review; the token for the clone travels in a request header, not in the address, and is never written to disk. The process that does the review runs in an environment built from scratch: it holds only the keys of the models it uses, with no home directory and no other secret from the server. The step that reads the files to work out what the change touches in the repository gets no key and connects to nobody. Text that passes from the pull request into our comment can’t open an HTML tag or become a link. And the review is left as a comment; it doesn’t block the merge.
Frequently asked questions
What is a cloud agent?
It is a coding agent that runs in the cloud instead of on your computer, on a clean machine started for each task. It clones the repository fresh, prepares the environment with a setup script, edits the code and runs the tests, and finally leaves a branch or a pull request. The model and the agent loop are the same as locally; what changes is the machine and what is carried over to it. Claude Code, Codex, GitHub Copilot, Cursor and Antigravity have one. Cursor used to call the feature Background Agents.
What is the difference between a cloud agent and a local agent?
They differ in five places. The code runs on a machine in the cloud, not on your computer, and can’t see your files. Only what you committed to the repository reaches the environment, not your personal settings. The agent sees only the secrets you give the environment, and the network is open or limited by an allowlist, depending on the tool. Each task runs on its own machine, so parallel work puts no load on your computer. The quota, though, comes out of the same plan, and parallel tasks use it up faster. If an agent you steer from your phone runs only while your computer stays on, it isn’t a cloud agent but a remote control.
Where does a cloud agent run my code?
In the vendor’s cloud by default: in Claude Code, on a virtual machine Anthropic manages; in Copilot, in GitHub’s cloud sandbox or on a GitHub Actions runner; in Cursor, on a separate virtual machine for each agent; in Codex, on a separate cloud machine for each task; in Antigravity, in an environment Google manages. If you want your own infrastructure, you can run Copilot on your own Actions runner or on a Linux machine you register, and Claude Code on your own servers on the Team and Enterprise plans; in Cursor, the commands run on your machine and the model at Cursor. If the repository isn’t on GitHub, the options narrow: Copilot works only with repositories on GitHub; Cursor also supports GitLab, Bitbucket Cloud and Azure DevOps; Codex Cloud doesn’t support GitLab yet; and Claude Code can take a GitLab repository only as a bundle uploaded from your computer, and can’t push the result back to it.
Can a cloud agent access my secrets?
Only the ones you give the environment. A .env file that sits on your computer but isn’t committed to the repository doesn’t go to the cloud, and neither do the variables in your shell. A secret you add to the environment, though, is handed over differently by each tool: in Claude Code and Codex, if you add it as a network secret, the key doesn’t enter the machine, and a proxy adds it to requests going to an address you allowed. In Copilot, secrets reach the agent as environment variables. In Cursor, a Runtime Secret is an environment variable too, but its value is redacted from the transcript and commits. According to Claude Code’s documentation, anyone who uses an environment can read a value you put in its environment variables, so don’t put keys there.
Do cloud agents cost extra?
Here is what the vendors’ pages said on 4 November 2026. In Claude Code, cloud sessions are on the Pro, Max, Ultra and Team plans, count toward the plan’s usage limits, and the machine isn’t charged separately. Codex Cloud is on the Plus, Pro, Business and Enterprise plans and shares the same allowance as local messages; it can’t be used with an API key. In Copilot, model usage comes out of AI credits, and the run time of the sandbox or the Actions runner out of your account’s included usage; in both cases, usage beyond that is billed. In Cursor, cloud agents are on Premium and higher plans, Teams and Enterprise; they draw on the plan’s usage at the rate of the model you choose, and ask for a spend limit the first time you use them. Antigravity’s remote agent is available on Google AI Pro and Ultra; how it is billed is not stated in its documentation.
Which work should you give a cloud agent?
Work with a clear definition, known acceptance criteria and tests: documentation, test coverage, CI and build configuration, small interface changes, bug fixes with written acceptance criteria. You can start several independent tasks in parallel. Keep work that is vaguely defined or broad, work that involves security or personal data, and work that depends on your machine, your VPN or your uncommitted changes on your own machine. GitHub’s and Claude Code’s guides draw this line. In the MSR 2026 study of 33,596 pull requests opened by agents, 84% of documentation tasks were merged, against 55% of performance tasks.
Who should review a pull request a cloud agent opens?
A person. Copilot doesn’t let an agent’s pull request be merged before a person reviews it, and doesn’t let the person who asked for the work approve it; Cursor also writes that nothing is merged until a person has reviewed it. In the MSR 2026 study, the most common pattern among rejected agent pull requests was that they were closed without any reviewer engaging. An AI code review tool can join that review as a second pair of eyes: diffox reviews each pull request in a fresh clone, leaves its findings as comments and doesn’t block the merge; the decision is still yours.