My cleaning script is a tangled monolith
The script becomes maintainable and reusable; a colleague adapts the ingest module for a new instrument within an hour.
OpenAI's terminal coding agent — reads, edits, runs your repo
OpenAI's agentic coding tool, purpose-built for code rather than general chat or web browsing. It runs directly against files already on your machine, not a remote sandbox.
Codex is OpenAI's agentic coding tool — a terminal agent (plus a VS Code extension and managed cloud tasks) that reads your repository, edits files, runs commands, and iterates on test failures until they pass. The CLI is open source (Rust) and runs locally in your own checkout, so your code stays on your machine. → Coding-focused: OpenAI models only, no bring-your-own-model.
Refactoring a messy analysis script or debugging a failing test end-to-end — purpose-built for code over general chat or web browsing.
Needs a paid ChatGPT plan or API credits to run at all — there's no free tier to try it on first.
Included with ChatGPT Plus ($20/mo) and Pro plans, or pay per token via the API. The CLI is free and open source; you pay for model usage.
A local copy of a GitHub repository that you will use as the workspace for Codex.
You will have a checkout on your machine that Codex can read and edit.
git clone https://github.com/openai/codex-demo.git (replace with any public repo you prefer).cd codex-demo.ls -R to display the full file tree.The Codex command‑line interface that reads a project’s files and builds an internal model of its code.
You will invoke Codex so it knows about the current repo structure and can later suggest edits.
codex init to initialize a Codex session for this project.codex status to view the current state reported by Codex.An interactive request to the Codex agent to create code that satisfies a described need.
You will have a new function added to the source tree, written by Codex.
utils.py).codex edit utils.py and when prompted, type: “Create a function called parse_input that takes a string and returns a dictionary of key/value pairs.”utils.py with cat utils.py to verify the new parse_input function appears.def parse_input(...):.A command that tells Codex to execute the project’s tests and report failures.
You will see which tests pass or fail, giving Codex context for further fixes.
codex test.An iterative workflow where Codex diagnoses a test failure, edits code, and re‑runs the tests until they pass.
You will have a previously failing test now passing after Codex’s automated edit cycle.
codex fix to start an automatic repair session.test_parse_input).30 outcomes in all — one per recipe below.
My cleaning script is a tangled monolith
The script becomes maintainable and reusable; a colleague adapts the ingest module for a new instrument within an hour.
Tests fail after a dependency upgrade
The upgrade unblocks in under an hour with a clear audit trail of why each fix was made.
Need to compute a clinical risk score from a paper
The calculator reproduces the paper's worked examples exactly and is ready to embed in the practice's internal tools, with the underlying formula and citation kept alongside the code so it stays auditable.
Need a repo risk summary in CI
The official Codex Action packages this exec mode for direct use inside GitHub Actions.
Need a code generation tool that runs on your computer
Learn how to install and launch Codex on your desktop for full feature access
Unsure if actions need confirmation
Control how Codex executes commands by setting the approval mode
Typing prompts is a hassle
Use voice input to send prompts to Codex instead of typing
Want balanced speed and answer quality
Balance speed and quality by choosing the appropriate reasoning level
Want to run desktop programs via a chat command
Enable Codex to open, write to, and launch desktop programs
Want to make Chrome open pages and click stuff automatically
Let Codex interact with the built-in browser to control Chrome tabs and pages
Need a new GitHub repository for your code
Create a GitHub repo directly from Codex and sync project files
Need a fresh project folder for a chess game
Organize work by creating a new project directory with a main branch
Want a multiplayer chess prototype
Trigger Codex to produce multiple files, set up WebSockets, and launch a server from a single prompt
Want to edit part of a web page by clicking it
Fine-grained UI editing by annotating HTML elements in the built-in browser
Want to start a local server without switching apps
Execute code directly from Codex's built-in terminal without leaving the app
Can’t get the new AI model to work
Set up GLM 5.2 via OpenRouter by copying its endpoint into your tool's provider settings and creating a profile
You must have a ChatGPT account to use OpenAI Codex
Upgrading to a paid ChatGPT plan prevents Codex from pausing after five-hour or weekly limits
Completed tasks still crowd your workspace
You can archive a session from the workspace once its tasks are finished
The Codex desktop application is available for Windows and macOS; Linux users must use the CLI
Need to run code and see results instantly
Enabling the built-in browser lets Codex run and test code within the same environment
Need to make a Word doc or call Canva
Installing plugins expands Codex's ability to generate documents or call external services
Want to pause automatic code changes
Using Shift+Tab switches Codex to a planning state where it only suggests changes
Need to build and test everything in a folder
The /goal command tells Codex to build and test all features in a folder automatically
Plan too big for the agent
Organizing a plan into separate feature files keeps the agent's context window low (≈13 %)
Need to keep design drafts safe from running
Saving mock-up or design ideas in a /plans folder prevents accidental execution
The pet avatar displays Codex's current activity, letting you monitor progress while working elsewhere
Learn how installing Codex from the Microsoft Store sets up a secure sandboxed environment
Run PowerShell commands from chat
See how Codex can execute PowerShell scripts directly on Windows
Outbound traffic is blocked until I approve it
Learn to toggle Codex's network access between auto-review, manual approval, and full
Need pre‑configured Kali or Ubuntu VMs for a hacking lab
Use Codex to automatically create Hyper-V virtual machines for hacking labs
Want a Python script from an English description
Codex parses the natural-language request, shows the file it will create, and waits for your approval before acting
When you approve, Codex writes the script, runs it, and shows the computed sequence in your terminal
I don’t know what the code does
Starting with an open-ended request (e.g., "Tell me about this project") lets Codex gather context, improving later targeted edits
Need to keep AI from touching other files
A sandbox isolates Codex's file operations, protecting critical paths like .git
Rules defined in AGENTS.md files closer to your current folder take precedence over broader definitions
Having to repeat conventions for every task
Writing your conventions once in AGENTS.md lets Codex enforce them on every task without extra effort
Need quick, cheap edits for routine work
Use the mini model for light or time-sensitive edits to reduce cost and increase speed
Need to lock in a model before starting the CLI
Specify the desired Codex model when starting the CLI to avoid later switches
Providing the exact symptom or error message lets Codex locate the failure in the codebase
Want the assistant to know my open files and selections
Providing open files, selections, and @file references lets Codex work with full project context
My prompts take forever locally
Long-running prompts can be sent to a cloud environment, freeing your local IDE
AI thinks too shallow or too deep
Adjusting reasoning settings tailors how much thought Codex applies to a request
Need to run long or parallel jobs without watching them
You can off-load long or parallel jobs to Codex's cloud so they run without your supervision
Want cloud jobs to run from a GitHub issue
Tagging `@codex` on an issue or pull request automatically hands the job to Codex's cloud
Need to hook up an external tool
You can extend Codex with external tools by defining an MCP server in the configuration file
When you need only the final answer from a command
You can pipe the final message directly into other tools or files
Use `--json` to get a structured JSON stream suitable for automated processing
Want the answer saved without extra redirection
Specify an output path so Codex writes its final answer without needing extra redirection
Let AI change my files while blocking all other actions
Grant Codex write access to the current workspace while keeping other permissions restricted
Start with the Plus plan to cover regular study work without overpaying
Move to the Pro plan only after you hit Plus's rate-limit ceiling
Use the Business plan for on-demand scaling without a fixed monthly fee
Verbally labeling each loop stage reinforces the mental model and improves debugging of agent behavior
Codex is OpenAI's agentic coding system, not a simple chatbot. It can autonomously read your codebase, run tests, edit files, execute shell commands, and propose pull requests. It works across four surfaces: a terminal CLI, a desktop app, an IDE extension (VS Code, Cursor, Devin Desktop — formerly Windsurf), and a cloud/web interface — all sharing one account.
Codex runs inside an OS-enforced sandbox that restricts it to your current project directory by default and blocks network access during the agent phase. It must ask for your approval before touching files outside the workspace, accessing the internet, or running commands flagged as potentially unsafe. The default mode stops and asks at dangerous boundaries rather than acting freely.
Yes. The cloud version runs each task in its own isolated, OpenAI-managed container pre-loaded with your connected GitHub repository. You assign a task, close your laptop, and Codex works asynchronously. When done, it produces a pull request you can review, accept, or reject. You can also trigger tasks by tagging @codex on a GitHub issue.
Codex is bundled into ChatGPT subscriptions: Free (limited), Plus ($20/month, a meaningful number of cloud tasks per rolling window), and Pro tiers ($100–$200/month, much higher limits). Usage typically resets on a rolling multi-hour cycle. If you exceed your limit you can buy additional credits. API-key-only usage is pay-as-you-go but loses some cloud GitHub features.
The desktop app runs natively on macOS and Windows. The CLI runs on macOS, common Linux distributions, and Windows via WSL2 (Windows Subsystem for Linux). A few GB of RAM is recommended. Git is optional but useful for the built-in pull-request helpers.
No — they share a name but are different things. The original 2021 Codex was a text-to-code completion model (a fine-tuned GPT-3) accessed via API, which OpenAI retired in 2023. The current Codex (2025–2026) is a full agentic coding platform powered by modern models, with a CLI, desktop app, IDE extension, and cloud task runner.
Codex is available on ChatGPT plans, with much lower usage limits on the free tier. The $20/month Plus plan gives meaningful access; the higher Pro plan multiplies that. You can also use an OpenAI API key instead of a ChatGPT subscription, which bills at standard API rates.
You can sign in with your regular ChatGPT account — no API key needed, and that draws on your plan's included usage. API keys are an alternative for developers who want Codex in automated scripts or CI/CD pipelines; usage then bills at pay-per-use API rates, and some cloud features need a ChatGPT workspace login.
You have several options: download the desktop app; install the CLI via npm ('npm install -g @openai/codex') or Homebrew; install the VS Code / Cursor / Devin Desktop (formerly Windsurf) extension; or use the web version in your browser. After installing, sign in with your ChatGPT account or API key, point it at a project folder, and type your first request in plain English.
All share the same models and account. The CLI and desktop app run locally and are best for interactive sessions where you review each change. The IDE extension embeds Codex in VS Code or similar editors. The cloud/web version runs tasks asynchronously in isolated OpenAI-managed containers — you can delegate a task, close your laptop, and come back to a pull request.
No coding knowledge is required to start. Non-technical users are advised to begin with the desktop app or web interface, which feel less intimidating than the terminal. You can ask Codex in plain English to explain what a project does or propose a change. That said, the cloud workflow produces git diffs and pull requests, so a basic idea of what those are helps when reviewing output.
When using Codex, your code is processed by OpenAI's servers — that is how the model reads and edits it. By default on consumer plans (Free, Plus), OpenAI may use your content for training; you can opt out in the privacy settings. Business, Enterprise, and Edu plans have training off by default. Codex also has separate settings for allowing or blocking training on full environments.
Tasks run asynchronously in the cloud, even when you're away
Not sure which coding model to use
You can switch between the default and lighter or heavier models during a session or set a default in your config
The same set on /recipes, filtered by tool and role.
The freshest beginner walkthrough — start here to get Codex working on your own machine before going deeper.
Watch after the beginner video when you want the full picture of how Codex fits a real coding workflow, not just a first run.
Codex is OpenAI's agentic coding system, not a simple chatbot. It can autonomously read your codebase, run tests, edit files, execute shell commands, and propose pull requests. It works across four surfaces: a terminal CLI, a desktop app, an IDE extension (VS Code, Cursor, Devin Desktop — formerly Windsurf), and a cloud/web interface — all sharing one account.
Codex runs inside an OS-enforced sandbox that restricts it to your current project directory by default and blocks network access during the agent phase. It must ask for your approval before touching files outside the workspace, accessing the internet, or running commands flagged as potentially unsafe. The default mode stops and asks at dangerous boundaries rather than acting freely.
Yes. The cloud version runs each task in its own isolated, OpenAI-managed container pre-loaded with your connected GitHub repository. You assign a task, close your laptop, and Codex works asynchronously. When done, it produces a pull request you can review, accept, or reject. You can also trigger tasks by tagging @codex on a GitHub issue.
Codex is bundled into ChatGPT subscriptions: Free (limited), Plus ($20/month, a meaningful number of cloud tasks per rolling window), and Pro tiers ($100–$200/month, much higher limits). Usage typically resets on a rolling multi-hour cycle. If you exceed your limit you can buy additional credits. API-key-only usage is pay-as-you-go but loses some cloud GitHub features.
The desktop app runs natively on macOS and Windows. The CLI runs on macOS, common Linux distributions, and Windows via WSL2 (Windows Subsystem for Linux). A few GB of RAM is recommended. Git is optional but useful for the built-in pull-request helpers.
No — they share a name but are different things. The original 2021 Codex was a text-to-code completion model (a fine-tuned GPT-3) accessed via API, which OpenAI retired in 2023. The current Codex (2025–2026) is a full agentic coding platform powered by modern models, with a CLI, desktop app, IDE extension, and cloud task runner.
Codex is available on ChatGPT plans, with much lower usage limits on the free tier. The $20/month Plus plan gives meaningful access; the higher Pro plan multiplies that. You can also use an OpenAI API key instead of a ChatGPT subscription, which bills at standard API rates.
You can sign in with your regular ChatGPT account — no API key needed, and that draws on your plan's included usage. API keys are an alternative for developers who want Codex in automated scripts or CI/CD pipelines; usage then bills at pay-per-use API rates, and some cloud features need a ChatGPT workspace login.
You have several options: download the desktop app; install the CLI via npm ('npm install -g @openai/codex') or Homebrew; install the VS Code / Cursor / Devin Desktop (formerly Windsurf) extension; or use the web version in your browser. After installing, sign in with your ChatGPT account or API key, point it at a project folder, and type your first request in plain English.
All share the same models and account. The CLI and desktop app run locally and are best for interactive sessions where you review each change. The IDE extension embeds Codex in VS Code or similar editors. The cloud/web version runs tasks asynchronously in isolated OpenAI-managed containers — you can delegate a task, close your laptop, and come back to a pull request.
No coding knowledge is required to start. Non-technical users are advised to begin with the desktop app or web interface, which feel less intimidating than the terminal. You can ask Codex in plain English to explain what a project does or propose a change. That said, the cloud workflow produces git diffs and pull requests, so a basic idea of what those are helps when reviewing output.
When using Codex, your code is processed by OpenAI's servers — that is how the model reads and edits it. By default on consumer plans (Free, Plus), OpenAI may use your content for training; you can opt out in the privacy settings. Business, Enterprise, and Edu plans have training off by default. Codex also has separate settings for allowing or blocking training on full environments.
codexcodex execcodex mcp-i--image-m--json--output-schema-o <path>/model/permissions~/.codex/config.toml~/.codex/AGENTS.md.gitworkspace-writeuntrustedon-requestnevernpm testgpt-5.5gpt-5.4-minigpt-5.3-codex-sparkAsk, share, or report — over on the Heidelberg AI community forum.