CodexHowSupport Us

Codex Cloud vs Running Locally

Running Codex against your own machine and running it through codex cloud aren't just two ways to reach the same result — they're two different execution environments with genuinely different tradeoffs around resource availability, persistence, and how a session fits into your broader workflow.

What actually differs about where execution happens

A local session runs against your own machine's filesystem, your own installed toolchain, and whatever resources your machine has available — genuinely fast for anything already set up locally, and immediately consistent with whatever local development environment you're used to. A cloud-run session executes somewhere else entirely, which changes the practical questions worth asking: what's actually available in that environment, how does it access the code it needs to work on, and what happens to any state it accumulates once the session ends.

Environment parity as the first thing to check

Before relying on codex cloud for real work, it's worth confirming the cloud execution environment actually has what a given task needs — the right language runtime version, the right installed dependencies, network access to whatever internal services a task might need to reach. A task that works flawlessly locally, where your environment is already configured exactly the way you need it, isn't guaranteed to behave identically in a cloud environment with a different starting configuration, and discovering a parity gap mid-task is a worse time to find it than before you started relying on it.

Why cloud execution is a natural fit for certain workflows

Tasks that don't depend heavily on your local machine's specific setup — a well-contained code change against a cleanly checked-out repository, something that doesn't need access to local-only services or credentials — are a good fit for cloud execution, and it offers something local execution structurally can't: work that continues without your machine needing to stay on and connected the whole time. For a long-running task you'd rather not keep your laptop open and awake for, that's a genuine, practical advantage.

Why local execution remains the right default for a lot of interactive work

For fast, iterative back-and-forth — the ordinary shape of most day-to-day coding work, where you're reviewing each change and giving the next instruction quickly — the latency of a local round-trip is usually lower, and you're not depending on network connectivity to keep working at all. Local execution also keeps everything within your own machine's existing security boundary, which for anything touching genuinely sensitive local resources is a real, if sometimes overlooked, consideration.

Sandbox and approval mode apply in both contexts, but check for differences

The underlying sandbox and approval concepts — read-only, workspace-write, danger-full-access, and the three approval modes — apply conceptually in both execution contexts, but it's worth confirming whether cloud execution's default trust posture and available flags actually match local execution's exactly, or whether the cloud environment has its own defaults worth understanding separately, since a cloud execution environment inherently starts with less of your own accumulated local trust context than your own machine does.

Cost considerations specific to cloud execution

Beyond the ordinary per-token pricing that applies regardless of where a session executes, it's worth checking whether cloud execution carries any additional resource or compute cost beyond the model API calls themselves — this is a detail worth confirming against current documentation rather than assumed either way, since it's exactly the kind of platform-specific cost detail that's easy to overlook when budgeting a workflow that's moved from local to cloud execution.

A reasonable way to decide between the two for a given task

For quick, iterative, locally-scoped work, default to local execution — it's faster to loop on and doesn't introduce an unfamiliar environment as a variable. For a longer-running, well-contained task that doesn't need your machine to stay connected the whole time, or a task you specifically want to kick off and check back on later, cloud execution is worth considering deliberately. Neither is a universal default; the right choice tracks the actual shape of the task, not a fixed preference for one over the other.

What to verify before trusting cloud execution with something important

Before relying on codex cloud for a task where a wrong or incomplete result would be costly, running a smaller, lower-stakes task through it first — confirming environment parity, checking how results and any accumulated state get returned to you — is worth the extra step, the same due diligence this site recommends before trusting any new workflow configuration with something that actually matters.

How results actually come back to you

Understanding exactly how a cloud-executed session's changes and output get delivered back — synced to your local checkout automatically, requiring an explicit pull step, surfaced as a diff you review before it touches your local files at all — is worth confirming before you start relying on cloud execution regularly, since assuming a delivery mechanism that isn't actually how it works is a straightforward way to lose track of what a session actually did versus what you think it did.

Combining both in a single workflow

Nothing prevents mixing local and cloud execution within the same overall piece of work — starting a well-scoped, self-contained piece of a larger task in the cloud while continuing fast, iterative work on the rest locally is a reasonable pattern once you're comfortable with both, and it's worth thinking of the two as complementary tools for different parts of a workflow rather than a single either-or choice made once, permanently, and applied uniformly to everything you do regardless of what any given task actually needs.

Verified 2026-08-09 against CodexHow facts module (src/data/facts/) — see /about/#accuracy.