What are cloud agents? Claude Code, Codex, Cursor, Grok
By Flavio
Cloud agents run a coding task on a remote machine instead of your laptop. How Claude Code, Codex, Cursor and Grok Bot start one, and what they cannot see.
Cloud agents run a coding task on a remote machine, then hand you a branch or a pull request. Your laptop can sleep. The agent clones the repo into that environment, edits there, and does not see the files and logins that exist only on your computer.
Cursor used to call the same feature background agents. The docs now say Cloud Agents.
How cloud agents work
You connect the git host, describe the task, and the vendor starts a session in a prepared environment. The agent works on its own checkout. You can watch, send a follow-up, or come back when it has pushed. Review is the same as any other diff. The machine is the part that changed.
A headless command on your own machine is a different thing. The process is local, even though nobody is typing. Remote control of a session on your laptop is different again. That session stops being useful when the laptop sleeps.
Cloud agents in each tool
| Claude Code | Codex | Cursor | Grok | |
|---|---|---|---|---|
| Product name | Cloud session | Codex Cloud | Cloud Agents | Grok Bot’s cloud computer. Grok Build is the local agent |
| Start from | claude.ai/code, the mobile app, Desktop with Cloud, claude --cloud | ChatGPT on the web, mobile or desktop, under Work in, Cloud | Desktop Cloud dropdown, cursor.com/agents, iOS, Slack, GitHub, Linear, the API | The Grok Bot apps |
| Repo source | GitHub, or a local bundle via --cloud | GitHub repositories in a published environment | GitHub, GitLab, Azure DevOps, Bitbucket Cloud | A computer with a browser, filesystem and terminal, shared by your Bots |
| Keeps going if you disconnect | Yes | Yes, each task has its own workspace | Yes | Yes, including with the laptop closed |
| Your local config | No, the repo only | What the environment was given | The cloud environment, not your home directory | The Bot’s computer, not your laptop |
Claude Code
A Claude Code cloud session runs on cloud infrastructure, Anthropic-managed by default, or on a self-hosted runner your organization operates. You start one from claude.ai/code, the Claude mobile app, the Desktop app with Cloud selected, or claude --cloud.
The session clones the GitHub repo into a VM, runs your setup script if you configured one, and pushes a branch when it reaches a stopping point. The conversation stays open after the push. You can comment, open a PR, or send another message. Sessions count toward your plan’s usage. The docs say there is no separate charge for the cloud VM.
Cloud sessions are available on Pro, Max and Team plans, and for Enterprise users with premium seats or Chat + Claude Code seats. The Default environment’s network access is Trusted: common package registries and other allowlisted domains.
The session does not use your local config. For a task that needs tools installed only on your machine, the docs point you at a local session or Remote Control.
See Get started with Claude Code in the cloud.
OpenAI Codex
Codex Cloud runs tasks in an environment you publish: repositories, tools and access. Each task has its own workspace and can keep working while your computer is asleep. On the web or in the desktop app, choose Work in, then Cloud, and select an environment. On mobile, open Codex.
For a new environment, you pick GitHub repositories and Codex inspects the project, installs dependencies and tests the workflow. You review that setup and publish it. Later tasks start from the published environment. You review changed files, ask for follow-ups, and commit or open a pull request.
The Codex Cloud docs also say you can start a task from the terminal and list recent cloud chats. This entry doesn’t name a CLI flag for that, because that page doesn’t.
See Codex Cloud.
Cursor
Cursor cloud agents run in isolated VMs with a development environment: cloned repos, installed dependencies, secrets, startup commands and network access. You start one from Cursor for iOS, from cursor.com/agents, from the Cloud dropdown under the agent input in the desktop app, with @cursor in Slack, on a GitHub or Bitbucket PR or issue, in Linear, or from the API. On Android, the docs say to use cursor.com/agents in Chrome.
They need a plan that includes them: Premium and higher, Teams, Enterprise, or a legacy paid plan. Free and Plus don’t include them. The first time you use them, you’re asked to set a spend limit. Usage is billed at the selected model’s rate. On a legacy request-based plan, the docs price cloud agents at API rates plus the Max Mode upcharge against included requests.
An admin connects source control before anyone can start an agent from a repository. The agent works on a separate branch and pushes it. You can configure the environment with agent-led setup, a saved snapshot, or a Dockerfile in .cursor/environment.json.
Hooks from .cursor/hooks.json in the repo run once the agent has a writable environment. User hooks in ~/.cursor/hooks.json do not, because the VM has no access to your home directory. Secrets are injected when an agent starts. An agent that is already running does not pick up a secret you add later.
See the Cursor cloud agents docs.
Grok Build and Grok Bot
Grok Build’s overview documents a local TUI, headless runs and ACP. It does not document a cloud VM for those sessions.
Grok Bot is the separate product. Each Bot works on a persistent cloud computer with a browser, filesystem and terminal, and work continues while the laptop is closed. Your Bots share that one computer: files, browser sessions and app logins. The docs say to treat anything placed on it as available to every Bot on the account. Between users, isolation is strict.
You message a Bot from the desktop app or the iPhone and Android apps. The computers those Bots work on run in Cursor’s cloud. That is Grok Bot’s computer, separate from a Grok Build session on your machine.
See the Grok Bot overview.
Details checked against each vendor’s documentation in October 2026.
A real example
A task that fits a cloud session is small, checked by a command, and doesn’t need a secret that lives only on your laptop:
The reading time counts words inside fenced code blocks. Stop counting those lines.
Add a test with one short paragraph and one code fence, change the counter until the test passes, and open a pull request. Don't change the RSS feed or any other page.
You send that to a Claude Code cloud session, a Codex Cloud task, or a Cursor cloud agent, after the environment can run the project’s tests. If the test command needs a private package registry, that access has to be in the environment before you start. Adding it afterward does not change a Cursor agent that has already started, and a Claude Code session only sees the network its environment allows.
If the fix depends on a local .env or a database running on your machine, keep the session local.
When to use cloud agents
Use one when you want the work to continue with the laptop closed, or when you want several independent tasks at once without a checkout for each. Claude Code’s quickstart lists parallel tasks, repos you don’t have locally, and tasks that don’t need frequent steering.
Stay local when the agent needs your logged-in tools, a device, or files that are not in the repo. Use headless mode when the job is a script on a machine you already control, such as CI.
Pitfalls
The cloud environment is a fresh checkout plus what you published. It is not your laptop. Claude Code says a cloud session uses the repo only. Cursor’s VM cannot read ~/.cursor/hooks.json. A skill or CLI you installed for yourself is absent until the environment installs it.
Secrets and network are part of the setup, not part of the prompt. A Cursor secret added mid-run waits for the next agent. A Claude Code environment on Trusted network access reaches allowlisted domains, not arbitrary hosts.
Cursor’s Free and Plus plans don’t include cloud agents. Claude Code cloud sessions need a Pro, Max, Team or qualifying Enterprise seat. Don’t assume every login that works in the local CLI can start a remote VM.
Grok Bot’s shared computer is shared by every Bot on the account. A file or a logged-in browser there is visible to the other Bots you run. That is a different sharing model from a Cursor cloud agent, which works on the repo it was started for.
Related on flaviocopes.com
- How to use Codex Cloud walks through a published environment, a task, and the review.
- How to run Cursor cloud agents on your own hardware is the path when the VM should be a machine you operate.
- How to use coding agents from your phone compares which products keep working after you leave the desk, and which ones are remote control of a computer that must stay awake.
- A deep dive into Grok Bot covers the cloud computer, schedules and handing implementation to a Cursor cloud agent.
- VM Peek is the local counterpart: a Mac test VM you watch and control with coding agents, on hardware you already have, instead of a vendor VM.
Related glossary entries
- Permission modes: Permission modes decide what a coding agent can do without asking. The modes in Claude Code, Codex, Cursor and Grok Build, and what YOLO mode really skips.
- Headless mode: Headless mode runs a coding agent from a script, with no chat UI. How claude -p, codex exec, the Cursor CLI and grok -p differ on permissions.
- Agentic coding: Agentic coding means directing an agent that reads your repo, edits files and runs commands. How that loop works in Claude Code, Codex, Cursor and Grok Build.
Want me to talk about your product? You can sponsor this site.