Skip to main content
Lesson 1 of 20 · Codex: AI-Assisted Development

What Is Codex: A Cloud Development Agent

Lesson 1 of 20 Updated November 3, 2026 Developer
On this page
  1. A development agent, not just an assistant
  2. How Codex works
  3. What Codex can do
  4. Codex vs. ChatGPT: what’s the difference?
  5. The models behind Codex
  6. Key takeaways

Lesson updated November 3, 2026 based on Codex documentation: Codex now works locally (ChatGPT desktop app, CLI, editor extension) as well as in the cloud (Codex Cloud), no longer limited to a cloud sandbox. Recommended models belong to the GPT-6 family, and Codex’s reasoning effort ranges from low to ultra depending on the model. November 3 addendum: The introduction previously cited the GPT-5.6 family, which Codex replaced with GPT-6 in late September 2026. Sources: Codex CLI · Codex Cloud · Agent approvals & security.

A development agent, not just an assistant

Codex is OpenAI’s development agent, and the distinction from a chatbot isn’t cosmetic. A conversational assistant answers your questions; Codex actually performs development tasks on your machine or in a cloud environment. It reads your source code, understands your project context, and produces concrete changes: writing code, running tests, refactoring, and debugging. Launched in 2025 and now powered by the GPT-6 model family, Codex shifts the question you ask. You no longer ask “How do I do X?” You ask Codex to do X.

An everyday scenario shows the difference. Your API endpoint hasn’t been validating inputs for three weeks, and you know it. With a conversational assistant, you describe the file, paste the code, receive a suggestion, then manually integrate it by fixing imports and resolving conflicts. Most of your time goes into that last step, and it’s the step that discourages you from starting. With Codex, you describe the expected outcome and receive a diff already applied to the repository, with tests executed.

How Codex works

Codex works in two ways, and your choice determines what it can touch.

Locally, via the ChatGPT desktop app, the CLI, or an editor extension, Codex works in the folder you open for it. It reads files, modifies code, and runs commands in an OS-enforced sandbox, generally limited to the current workspace, with network access disabled by default. An approval policy decides when it must stop and ask for your permission before acting.

In the cloud, Codex Cloud runs the task in an environment you’ve prepared: your GitHub repositories, their dependencies, and their tools. Each task gets its own workspace and continues even when your computer sleeps. You configure network access, environment variables, and secrets per environment.

In both cases, the cycle remains the same:

  1. Analysis — it reads relevant files, understands the architecture, detects the framework
  2. Execution — it writes code, runs commands, executes tests
  3. Verification — it checks that its changes work
  4. Delivery — it presents the changes for your review; you keep them, request a fix, then commit or open a pull request

This framework—sandboxing, controlled network access, approvals—is what lets you entrust a real repository to an agent. Start with default permissions, and relax them only for trusted repositories or specific workflows.

What Codex can do

The range of tasks covers most of a team’s daily work, from adding features to heavy migrations. The table pairs each capability with an instruction as you would actually write it.

CapabilityConcrete example
Write code”Add a POST /api/users endpoint with Zod validation”
Refactor”Migrate this class component to a React functional component”
Write tests”Generate unit tests for the auth module”
Debug”The user.spec.ts test is failing—find and fix the bug”
Document”Add JSDoc to all exported functions in src/lib/“
Migrate”Migrate the project from Express to Fastify”

Notice the form of these sentences: each names a file or module, an action verb, and an expected result. This is the grammar of working with an agent, and an instruction missing any of these three elements almost always yields an approximate result.

Codex vs. ChatGPT: what’s the difference?

Codex is now part of ChatGPT: in the desktop app, you select Codex from the ChatGPT menu for software development, with your code context and developer tools, whereas Chat handles quick questions and Work handles research and deliverables. The difference lies in what the agent can touch. In a conversation, you paste code and get back an answer that you must integrate yourself, handling conflicts, missed imports, and re-running tests on your own. With Codex, the agent works in your folder or your repositories: it makes the changes, runs the tests, and presents the result for your review before commit or pull request.

The whole difference comes down to one word: Codex is an autonomous agent. It plans, executes, verifies, and iterates. The corollary is worth anticipating because it changes your daily work: your role shifts upstream to task formulation and downstream to result review.

The models behind Codex

Codex documentation currently recommends four models. GPT-6 Astra suits the most demanding, end-to-end work. GPT-6.1 Sol offers performance close to Astra at lower cost, making it the choice for long, repeated work—it’s also the model the documentation uses as the default example (model = "gpt-6.1-sol"). GPT-6.1 Terra, fast and efficient, stands out in writing, visual understanding, and computer use. GPT-6 Luna serves targeted, repetitive tasks where you can recognize a good result.

The second slider is reasoning effort (model_reasoning_effort), ranging from low to ultra depending on the levels the chosen model accepts. Higher effort increases response time and consumption but can improve quality on complex work: fixing a label handles low effort, while a framework migration deserves more.

Key takeaways

  • Codex is an agent that executes tasks, not a chatbot that answers questions
  • It works locally (OS sandbox, network off by default, approvals) or in the cloud (Codex Cloud environments)
  • It understands your project context: the folder opened locally, the repositories in the cloud environment
  • It produces verifiable results: diffs, PRs, execution logs
  • Four recommended models (GPT-6 Astra, GPT-6.1 Sol, GPT-6.1 Terra, GPT-6 Luna) and adjustable reasoning effort