What local Codex is
Local Codex runs on your machine. That includes the Codex view in the ChatGPT desktop app, the Codex CLI, and the IDE extension. OpenAI's article on Work and Codex says: "Codex can work with local folders, repositories, terminals, and developer tools."
Because the work happens on your computer, local Codex uses your files as they are right now, including uncommitted changes, local configuration, and tools you've installed. If your computer sleeps or you close the app, local work stops with it.
What Codex Cloud is
Codex Cloud runs the same kind of coding task somewhere else. OpenAI's developer page describes the benefit plainly: "Each task has its own workspace and can keep working while your computer is asleep."
You start a cloud task from the web, the desktop app, or mobile. OpenAI's developer docs say to start a chat and choose Work in, then Cloud, on the web or desktop, or to open Codex on mobile. You pick an environment, describe the task, and review the results when it's done.
The environment is the key idea. OpenAI's help article says: "A cloud environment brings together the repositories, tools, dependencies, and access settings Codex needs for your project." Once someone prepares and publishes an environment, new tasks can start from it.
Where the work happens
The practical difference is where the files live.
Local: your working directory. Codex reads and writes the files you see in your editor.
Cloud: a separate workspace on an OpenAI-managed computer. OpenAI's help article says: "Each task starts from the prepared setup in its own isolated workspace, with separate working files and changes."
That isolation works in both directions. A cloud task works on its own copy rather than the files on your laptop, and two cloud tasks don't share uncommitted work. The help article says: "Starting a new task creates a separate workspace and does not recover another task's uncommitted changes."
What a cloud task can see
A cloud task works with what's in its environment: the repositories, dependencies, tools, and access settings someone set up for it. If the default environment is available, OpenAI's developer page says you can start without choosing a repository, and Codex can check out repositories available through your connected GitHub or GitLab account.
Access to outside services is configured in the environment, not on your laptop. OpenAI's environment docs describe internet access settings, environment variables, and network secrets, including a personal vault for your own values. For network secrets, the docs say programs receive a placeholder and a proxy substitutes the real value for allowed destinations.
Each person also uses their own GitHub connection. OpenAI's help article says: "Each person uses their own GitHub connection." Access to an environment doesn't replace your repository permissions.
What each keeps after the task
Local tasks leave their changes in your working directory. They're as permanent as any other file on your machine until you commit, change, or delete them.
Cloud tasks keep their own saved state, for a while. OpenAI's help article gives the window: "By default, saved virtual machine (VM) state is recoverable for up to 7 days after the last start of a turn or task resume." It adds what that window isn't: "This recovery window describes saved VM state; it is not a conversation-history retention period."
So the conversation and the task's saved files are different things. To keep going, OpenAI's article says to return to the original task, since a new task won't have the old one's uncommitted changes. Its advice is simple: "Commit important work to source control."
OpenAI's environment docs repeat the point: "Saved state doesn't replace source control."
When the environment changes
If you update the environment, existing tasks don't change. OpenAI's help article says: "Changes to an environment's published setup apply to new tasks. Existing tasks keep their own state."
The environment docs describe the same split. A new task in a published environment starts from the environment's prepared files, while an existing task continues with its own saved files, including uncommitted changes and installed tools. Updating the setup means editing the environment, saving it, and publishing it again, then starting a new task to use the update.
How memory and instructions fit in
Codex's local memories belong to the machine. OpenAI's memories page says local Codex clients use a separate local memory store, and the feature is off by default until you enable it for a machine. The documentation describes that store as part of local Codex; it doesn't describe cloud tasks reading it.
For guidance that every task should follow, OpenAI points to files instead. Its memories page says: "Keep required team guidance in AGENTS.md or checked-in documentation." An AGENTS.md committed to your repository is part of the repository a cloud task checks out, while notes that exist only on your laptop aren't part of a cloud environment unless you add them.
History is separate too. OpenAI's article on Work and Codex says Codex is a separate view in the desktop app, and "Its history remains separate from ChatGPT history."
How usage compares
Local and cloud work come from the same plan. OpenAI's pricing page says: "Local messages and cloud chats share your plan's usage allowance."
They don't cost the same, though. The same page says: "Cloud tasks may use more of your allowance than local messages." It also notes that usage depends on the model, the size and complexity of the task, and whether you run it locally or in the cloud.
You can check your usage and reset times in the usage dashboard the pricing page links to.
If your workspace used the older cloud experience
Some teams still see a legacy version. OpenAI's help article says Code Review, Security Review, and the existing Linear and GitHub integration workflows continue to use Codex Cloud (Legacy) during the transition. Moving a supported legacy environment to the new experience is something you start yourself. The article says: "Migration is something you initiate; it leaves the original environment unchanged, and existing legacy task history remains viewable."
Remote access isn't the cloud
There's a third option that looks like the cloud but isn't. The ChatGPT mobile app has a Remote tab for following desktop Codex chats from your phone. OpenAI's article says remote access to a desktop task "is separate from running a task in a cloud environment, and it does not add those desktop chats to your web or mobile chat history."
With remote access, the work still runs on your computer, so your computer has to be on. With Codex Cloud, it runs on OpenAI's machines.
Which one to use
Use local Codex when you want to watch the work, use files and tools that only exist on your machine, iterate quickly on uncommitted changes, or keep usage lower.
Use Codex Cloud when the task is long and should keep running after you close your laptop, when several tasks should start from the same prepared setup, or when you want to start or check work from your phone.
Use both by keeping shared guidance in a committed AGENTS.md, so local and cloud tasks start from the same instructions.
What people try first
Expecting a cloud task to see local files. It works in its own environment, not on your laptop.
Starting a new cloud task to continue old work. A new task doesn't recover another task's uncommitted changes; go back to the original.
Treating saved state as storage. It's recoverable for a limited time; commit important work.
Updating the environment mid-task. Existing tasks keep their own state; start a new task to use the update.
Assuming local memories follow you to the cloud. OpenAI describes them as a local store on each machine.
Confusing remote access with cloud tasks. Remote access still runs on your computer.
The Fix: Choose the right mode for each task
Step 1: Decide where the files need to be
If the task needs your uncommitted local work, run it locally. If it can start from the repository, the cloud works.
Step 2: Put shared guidance in AGENTS.md
Commit the rules both modes should follow.
Step 3: Commit important work
Don't rely on a cloud task's saved state as long-term storage.
Step 4: Write down the context that lives only in your head
Note project decisions and conventions in your own words, so they're available to any task in any mode.
Setting this up in MemoryLake
Local Codex can keep notes on your machine, cloud tasks start from an environment, and each task's saved state expires. The context that should guide every task, such as why a service is structured the way it is, is worth keeping in one place you control, outside any single machine or workspace.
MemoryLake is a memory layer for that kind of context, kept in one place you maintain and available to the assistants you connect, such as ChatGPT, Claude Code, and Codex.
You write the entries yourself, in your own words. Nothing is read out of, written to, or deleted from your cloud environments, your tasks' saved state, your local Codex memories, your repositories, or any vendor's store. Codex Cloud and local Codex work the way OpenAI describes them.
Step 1: Create an API key
Sign in and generate a key from the dashboard. Keep it somewhere private.

Step 2: Upload your first memories
Start with what you wrote in Step 4 of the fix: project decisions and conventions. One topic per entry.

Step 3: Connect your AI & agents
Connect ChatGPT, Claude Code, Codex, and the other assistants you use, so the same context is there in each.

What this changes in practice
The first difference is portability. Your notes don't live on one laptop or in one cloud workspace.
The second is consistency. The same context is available whether a task runs locally or elsewhere.
The third is control. You decide what each entry says, separately from any saved state.
Best practices for Codex Cloud and local
Run quick, hands-on work locally. It uses your files and tools directly.
Send long tasks to the cloud. They keep going while your computer sleeps.
Keep instructions in a committed AGENTS.md. Both modes start from the repository.
Return to the original cloud task. New tasks don't inherit uncommitted changes.
Commit before the recovery window ends. Saved state is time-limited.
Watch usage. Cloud tasks may use more of your allowance.
Conclusion
Local Codex runs on your computer, in your working directory, with your tools and uncommitted changes, and stops when your computer does. Codex Cloud runs on OpenAI-managed computers, starts each task from a prepared environment in its own isolated workspace, and keeps going while your computer sleeps. A cloud task's saved state is recoverable for a limited time after its last activity, and new tasks don't inherit another task's uncommitted work.
Both share one plan allowance, and cloud tasks may use more of it. Local memories belong to a machine, so guidance every task should follow belongs in a committed AGENTS.md. Writing down your project context in your own words keeps it available to every task, whichever mode it runs in.