Cloud development environments for AI coding agents
What a coding agent needs from a cloud development environment, the kinds of products that provide one, and questions to ask before you choose.
The short answer
A cloud development environment is a machine in the cloud with your code, tools, and services. For coding agents, a good one runs your whole app so the agent can test its changes. It also gives each task its own copy of the environment, keeps running after you close your laptop, and lets you open the app the agent is running. GitHub Codespaces, Coder, and Ona build environments from dev container or Terraform files. Anthropic and OpenAI run their own agents in the cloud with your repository. CloudCLI, managed agent platforms, and Boxes.dev are built for running agents. Boxes.dev gives each task a full copy of a machine where your app already runs.
What a cloud development environment is
A cloud development environment is a development machine that runs in the cloud instead of on your laptop. It holds the code, tools, and services you need to build and run your app, and you can reach it from a browser, an editor over SSH, or an app. Products such as GitHub Codespaces, Coder, and Ona were built so that people could get a working environment without setting up their own computer.
Coding agents such as Claude Code and Codex change what you need from a cloud environment. An agent often works for long stretches without you, sometimes on several tasks at once, and it can only test what its environment can run.
What coding agents need from an environment
- A way to run your whole app. You'd expect an engineer to run the app locally before shipping a change; a full dev environment lets agents do the same. An agent that can start your app with its databases, services, and test data can test its changes in a browser and reproduce bugs in the real app.
- A separate environment for each task. Parallel tasks need their own files, ports, and databases, or they collide. See Run coding agents in parallel.
- A quick start for each task. Each task should start from an environment where the app already runs, without rebuilding dependencies and reloading data every time.
- A machine that keeps running after you leave. The agent should keep working after you close your laptop, but an idle environment shouldn't keep costing money. Whether your dev servers are still running when you come back depends on what the environment keeps while it's idle.
- A way to open the running app. You need to see the app the agent is testing, share it with a reviewer, and give OAuth callbacks and webhooks an address that reaches it.
- Credentials you set up once. You should be able to set up environment variables, cloud access, and private network access once and use them in every environment, without pasting secrets into each task.
- A place for you to work too. You'll want a terminal, an editor, diff review, and a way to answer the agent from your phone.
General cloud development environments
These products give people and agents the same kind of environment, usually defined in a configuration file. As of September 2026:
- GitHub Codespaces runs each codespace on a VM in GitHub's cloud, using a
dev container defined by your repository's
devcontainer.json. Prebuilds can speed up creation. A codespace stops after 30 minutes of inactivity by default, and you can set the timeout anywhere from 5 to 240 minutes. Stopping ends running processes but keeps saved changes, and inactive codespaces are deleted after 30 days by default. Compute costs $0.18 an hour for 2 cores and $0.36 for 4 cores, plus $0.07 per GB of storage each month. Personal accounts get a monthly free quota, but organizations don't. You can install Claude Code or Codex in a codespace as you would on any Linux machine. - Coder is an open-source platform that you host on your own infrastructure. Workspaces are defined with Terraform and can run as EC2 VMs, Kubernetes pods, or Docker containers. Idle workspaces stop automatically. Coder also has its own agent, Coder Agents, and a Premium license adds support.
- Ona, formerly Gitpod, builds each environment from a dev container, including tasks and services such as databases. Environments run on Ona's cloud or, on Enterprise, in your own AWS or GCP account. Storage persists when an environment stops. Ona also has its own agent. The Core plan starts at $20 a month, with usage billed in Ona Compute Units that cover both the agent and the machines.
These suit teams that already define their environment with a dev container or Terraform and want people and agents to share it. Setup follows those files, so data and services that live outside them need their own setup steps.
The agent vendors' clouds
Anthropic and OpenAI each run their agent in environments they manage:
- Claude Code cloud sessions give each session a fresh Ubuntu VM with your GitHub repository, common toolchains, Docker, PostgreSQL, and Redis. Files your setup script installs are cached for about seven days. You can't open a shell in the VM, and Anthropic reclaims it when the session sits idle.
- Codex cloud tasks each run in their own workspace, created from a reusable environment that Codex helps you prepare, test, and publish. Local files, running processes, browser sign-ins, and VPN access on your computer don't carry over to a cloud task.
These suit tasks that need only your repository and the tools the environment installs, and they're included in the agent's plan. See How to run Claude Code in the cloud for more on cloud sessions.
Platforms built for coding agents
Several products are built around running coding agents on cloud machines. As of September 2026:
- CloudCLI runs Claude Code, Codex, Cursor CLI, Gemini CLI, and OpenCode in persistent containers called environments, with your own subscriptions or keys. Each environment is an Ubuntu container that can hold several projects, and you or the agent can install your stack with apt. You can open an environment in CloudCLI's web app, including on a phone, in VS Code, or over SSH. An environment stops after an idle period; its files are kept, but running processes end. The Hobby plan costs €7 a month for one active environment with 2 CPU cores and 4 GB of memory, and Growth costs €20 for five. CloudCLI's open-source web UI is free to host yourself.
- Replicas, Tembo, and Niteshift build a VM for each task from setup scripts. See how they differ.
- Boxes.dev, covered in the next section, gives each task a full copy of a machine where your app already runs.
Developers building their own agent products can also create sandboxes from code with services such as E2B and Daytona.
Boxes.dev
Boxes.dev is a cloud development environment built for Claude Code and Codex. Each task starts from a copy of a machine where your app already runs.
You'll start by setting up your app on a cloud machine called the Template box, with the tools, databases, services, and data it needs. A setup agent can copy the environment from your laptop, including the agent settings, skills, and MCP definitions you choose to bring, or build it from a GitHub repository. Boxes.dev saves the Template box as a snapshot. Each task then runs on its own devbox: a full, isolated copy of that machine with its own databases, services, and ports. An optional maintenance script keeps the Template box current. It runs on a schedule or when watched files such as a lockfile change, and each successful run saves a new snapshot.
On a devbox, the agent can start your app, test its changes in a browser, and reproduce bugs against your real services and data. It can also take screenshots and record video for you to review.
A devbox goes to sleep after about five minutes when no agent is working and nobody is using it. Sleep keeps its files and memory, so dev servers, databases, and terminal sessions pick up where they left off when it wakes. A sleeping devbox doesn't use box-hours. You'll get a notification when the agent replies or needs your input.
The desktop app's Ports tool forwards a devbox's ports to the same ports on
your laptop, so you can open the running app there. Local URLs give each
devbox its own .localhost address, so you can open several side by side. A
public link shares the app with anyone. A Project URL is a stable public
address that you point at the devbox you're testing, so OAuth callbacks and
webhooks can reach it.
You can work on a devbox yourself, with terminal tabs, a file editor, Git review that sends your line comments to the agent, and a browser you share with the agent. You can also connect over SSH, open the devbox in VS Code or a JetBrains IDE, or use the iOS and Android apps, which include a terminal.
Some things only need to be set up once for all your devboxes: environment
files with project, team, and personal values; MCP servers and agent plugins;
and access to AWS, private services on your Tailscale network, and services
that allow only your team's static egress IP. You can start work from the apps,
the dvb CLI, Slack, Linear issues, or scheduled automations. With your
permission, agents can start other agents on new devboxes and message them.
Teammates get read-only access to threads you share.
Boxes.dev runs Claude Code and Codex with your own Claude or ChatGPT plan, or an API key. As of September 2026, the free trial includes 10 box-hours. Starter costs $19 per user each month, with 40 box-hours and up to four devboxes awake at once. Pro costs $99, with 250 box-hours and up to ten awake. Extra time costs $0.75 per box-hour on Starter and $0.60 on Pro. A box-hour is one default devbox, with 4 vCPUs and 8 GiB of memory, awake for an hour. See Plans, seats, and box-hours.
To try it, connect Claude or Codex, then set up a project.
A checklist for choosing
Ask these questions of each environment you consider:
- Can the agent run your whole app, with its databases and services, and test its changes in a browser?
- How is the environment built, and who keeps it current as your code changes?
- Does each task get its own environment, with its own database and ports?
- What happens when an environment goes idle: do running processes stop, is the environment deleted, or does it sleep and resume with its memory?
- How do you and your reviewers open the running app, and can OAuth callbacks and webhooks reach it?
- Which agents does it run, and do they use your own subscription?
- Where do secrets and cloud credentials live, and what can the agent reach?
- Can you work in the environment yourself, including from your phone?
- What does your usage cost: how much machine time is included, how many environments can run at once, and what does extra time cost?
- Does it run in the vendor's cloud or on infrastructure you manage?
The best test is a real task. Give the same bug fix or small feature to the agent in each environment you're considering, and see which agents can run the app and show you that their change works.
Frequently asked questions
What's the difference between a cloud development environment and a sandbox?
A cloud development environment gives you and an agent a place to develop your app with your tools, services, and data. A sandbox usually means a short-lived, isolated machine that runs code for a task or a program and then goes away. Some products for coding agents are sandboxes that start from your repository. Others, such as boxes.dev, start from a full development environment.
Can I run Claude Code or Codex in GitHub Codespaces?
Yes. You can install either agent in a codespace and run it in the terminal. When a codespace stops, its running processes stop with it, so make sure your idle timeout covers how long you'll leave the agent working. The timeout can be up to four hours.
Do I need a cloud development environment to run agents in the cloud?
No. Anthropic and OpenAI run their agents in their own clouds, and you can run an agent on a server you manage. See How to run Claude Code in the cloud for those options.
Sources
- GitHub: Codespaces billing, timeout period, and codespace lifecycle.
- Coder: documentation.
- Ona: environments and pricing.
- CloudCLI: cloud environments, pricing, running and previewing your app, and the API reference.
- Anthropic: Use Claude Code in the cloud and cloud environments.
- OpenAI: Codex environments.
- Replicas, Tembo, and Niteshift: the sources listed on each comparison page.
- Boxes.dev: How boxes.dev works, Startup, teardown, and maintenance, Environment files and secrets, Sleep, wake, and recover a devbox, Preview your app, Project URLs, and Plans, seats, and box-hours.
Related
Product names are trademarks of their respective owners.
