Codex is OpenAI’s coding agent that can read, modify, and run code. It helps you build faster, squash bugs, and understand unfamiliar code. With the Codex VS Code extension you can use Codex side-by-side in your IDE, or delegate tasks to the cloud.
Set up the extension
Get the Codex extension from the Visual Studio Code marketplace, or download it for your IDE:
- Download for Visual Studio Code
- Download for Cursor
- Download for Windsurf
- Download for Visual Studio Code Insiders
After installing, you’ll find the extension in your sidebar next to other extensions. (It might be hidden in the collapsed section.) Most people like dragging “Codex” to the right side of the editor.
We recommended signing into your ChatGPT account to use Codex as part of your Plus, Pro, Team, Edu, or Enterprise plan. Learn more about what’s included in your ChatGPT plan. (You can also use Codex with an API key, but this requries additional setup.)
Pair with Codex
Add Codex as a panel in VS Code to chat, edit, and preview changes seamlessly. With context from opened files and selected code, you can write shorter prompts and get faster, more relevant results.
Approval modes
We’ve chosen a powerful default for how Codex works on your computer called Agent
. In this approval mode, Codex can read files, make edits, and run commands in the working directory automatically. However, Codex will need your approval to work outside the working directory or access network.
When you just want to chat, or if you want to plan before diving in, you can switch to Chat
with the switcher under the extension chat input.
If you need Codex to read files, make edits, and run commands with network access, without approval, you can use Agent (Full Access)
. Exercise caution before doing so.
Delegate to Codex in the cloud
You can offload bigger jobs to Codex in the cloud, then track progress and review results without leaving your IDE. First, you’ll need to set up a cloud environment for Codex to work in. Then pick your environment and select Run in the cloud
. You have Codex run off main—which is useful for starting new ideas—or instead you can have Codex work from your local changes—useful for finishing off a task.
When you start a cloud task from a local conversation, Codex remembers the conversation context so it can pick up where you left off.
Follow up on cloud tasks
The Codex extension makes previewing cloud changes easy. You can ask for followups to be done in the cloud, but often you’ll want to apply the changes down locally to test and finish up. When continuing the conversation locally, Codex also retains context to save you time.
Detailed docs
The VS Code extension is built around the open source Codex CLI. For more detailed docs covering advanced configuration, MCP, and more, check out readmes and code at https://github.com/openai/codex.
Frequently asked questions
What platforms are supported?
The Codex VS Code extension is available on macOS and Linux.
Windows support is still experimental. Currently, the best experience on Windows is to use Codex with the Windows Subsystem for Linux.
What editors is the Codex IDE extension available in?
The extension works with VS Code forks like Insiders, Cursor, or Windsurf.
How do I update the extension
The extension autoupdates, but you can also open the extension page in your IDE to manually check for updates.