Codex IDE Extension
The Codex IDE extension puts OpenAI's coding agent beside your code in VS Code, Cursor, Windsurf and VS Code Insiders (Marketplace id openai.chatgpt), while Xcode and JetBrains IDEs offer Codex through their own AI assistants. It uses the same ChatGPT plan, models and config.toml as the Codex CLI and the ChatGPT desktop app.
The Codex IDE extension is installed from the Visual Studio Marketplace as openai.chatgpt and works in Visual Studio Code, Cursor, Windsurf and VS Code Insiders; Xcode and JetBrains IDEs do not use the extension but offer Codex as an agent inside their own coding assistants (OpenAI docs). You sign in with your ChatGPT account or an API key, and Codex then reads the files and selection you have open, edits in place and shows each change as a diff you can keep or drop. It costs nothing beyond your plan: the extension is included with every ChatGPT plan's Codex usage (Codex Pricing and Limits).
The extension is one of the ways to use Codex, next to the Codex App and the Codex CLI; all three share ~/.codex/config.toml and the same MCP servers (Models, MCP). It first shipped on Aug 27, 2025, for "VS Code, Cursor, Windsurf".
Quick facts
| Editors with the extension | VS Code, Cursor, Windsurf, VS Code Insiders |
| Marketplace id | openai.chatgpt |
| Xcode | Codex as an agent in Xcode's coding assistant |
| JetBrains IDEs | The Codex agent in JetBrains AI Assistant |
| First release | Aug 27, 2025 |
| Sign in | ChatGPT account or API key |
| Models | GPT-6 Astra, GPT-6.1 Sol, GPT-6 Luna; GPT-6.1 Terra is not listed for the IDE extension, as of Nov 6, 2026 |
How do I install the Codex extension in VS Code?
- In VS Code, Cursor or Windsurf, open the Extensions view and install OpenAI's extension (id
openai.chatgpt), or open the Marketplace page. - Select the Codex icon in the sidebar. If you cannot see it, open the Command Palette and run Codex: Open Codex Sidebar.
- On the signed-out screen select Sign in with ChatGPT and finish in the browser, or sign in with an API key.
- Open a project and ask Codex to explain the code, make a focused change or help debug something.
Source: Codex IDE extension, Authentication, OpenAI docs, read Nov 6, 2026. As with the CLI, OpenAI suggests a Git checkpoint before and after each task.
Codex in Xcode and JetBrains IDEs
Neither Xcode nor JetBrains IDEs install OpenAI's extension. In Xcode, open the coding assistant, start a new chat and choose Codex as the agent; In JetBrains IDEs, open AI Chat and select Codex, which JetBrains AI Assistant offers as a third-party agent (OpenAI docs). JetBrains lets you activate it with a JetBrains AI subscription, an OpenAI API key or a ChatGPT account; a key must come from OpenAI itself, not a third party, and Codex there ignores AI Assistant's .aiignore file, so files listed in it can still be read. Codex in AI Assistant receives the open file and your selection automatically (JetBrains, last modified Oct 7, 2026). Which features each IDE offers is set by Apple and JetBrains, not by OpenAI's extension.
What the extension does
- Uses what you have open. Add an open file, a selection or a recent chat to the prompt, so Codex starts from the code you are looking at.
/idepulls open files and the current selection into the next prompt (Developer commands). - Shows changes beside your code. Each answer comes with a summary and a focused diff; keep the edits you want and follow up in the same chat (Codex IDE extension).
- Reviews your work.
/reviewreviews against a base branch or your uncommitted changes and reports findings by priority; it appears only when the project is a Git repository (Code review). See Codex Code Review. - Delegates to the cloud. A longer task can go to Codex Cloud, and the chat stays in the editor for when you come back to review the result (Codex IDE extension).
- Handles TODOs. A CodeLens above
TODOcomments lets Codex address them (settingchatgpt.commentCodeLensEnabled) (Developer settings). - Works toward a goal.
/goalstarts Goal mode for the open workspace (Long-running work).
Settings and shortcuts
Open the gear icon in the Codex sidebar and select Codex Settings, or Open config.toml to edit the shared configuration directly. Editor-only settings start with chatgpt. and live in the editor's own settings (search for @ext:openai.chatgpt); they do not go in config.toml (Developer settings).
| Setting | Default | What it does |
|---|---|---|
chatgpt.followUpQueueMode |
queue |
Whether a message sent during a run waits (queue) or steers the run (steer) |
chatgpt.composerEnterBehavior |
enter |
Whether Enter sends, or Cmd or Ctrl+Enter is needed |
chatgpt.reviewDelivery |
inline |
Runs /review in the current chat or in a separate one |
chatgpt.runCodexInWindowsSubsystemForLinux |
false |
On Windows, runs Codex in WSL |
chatgpt.openOnStartup |
false |
Opens the Codex sidebar when the editor starts |
Source: Developer settings, read Nov 6, 2026. Cmd+N (macOS) or Ctrl+N (Windows, Linux) starts a new chat, and commands such as "Add selected text range as context" can be bound to keys of your choice (Developer commands).
Working with the desktop app
When the ChatGPT desktop app and the extension are open on the same project, they share active chats and editor context: turn on IDE context in the app's composer and Codex in the app can use the files open in your editor. A chat can move from the extension to the app and back (Developer settings).
On Windows and WSL
The extension runs Codex natively on Windows with the Windows sandbox. If your code lives in WSL2, either open VS Code from inside WSL (code . in a WSL shell, which opens a "WSL: <distro>" window) or set chatgpt.runCodexInWindowsSubsystemForLinux to true (Windows WSL, Developer settings).
Which plans include the IDE extension?
Every ChatGPT plan includes Codex, and the Plus plan card names the IDE extension directly ("Codex on the web, in the CLI, in the IDE extension, and on iOS") (pricing). With an API key instead of a ChatGPT sign-in, the extension works for local tasks at API prices but without cloud features (pricing). Usage in the extension counts against the same Codex limits as the app and CLI. As of Nov 6, 2026 OpenAI's models page does not list GPT-6.1 Terra for the IDE extension (Models).
Frequently asked questions
Is there a Codex extension for VS Code? Yes. OpenAI's Codex extension for VS Code has the Marketplace id openai.chatgpt, and the same extension works in Cursor, Windsurf and VS Code Insiders.
Does Codex work in JetBrains IDEs? Yes, but not through OpenAI's extension: in JetBrains IDEs, open AI Chat and select Codex, which JetBrains AI Assistant provides.
Does Codex work in Xcode? Yes. In Xcode, open the coding assistant, start a new chat and choose Codex as the agent, as OpenAI's docs describe.
Is the Codex IDE extension free? The extension costs nothing to install and works with every ChatGPT plan, including Free and Go, within that plan's Codex usage limits. You can also use it with an OpenAI API key at API prices.
Can the Codex extension use files I have open? Yes. The Codex IDE extension can add open files, the current selection and recent chats to a prompt, and /ide includes that editor context in the next message.
Sources
- Codex IDE extension, OpenAI docs, read Nov 6, 2026
- Developer settings, OpenAI docs, read Nov 6, 2026
- Developer commands, OpenAI docs, read Nov 6, 2026
- Authentication, OpenAI docs, read Nov 6, 2026
- Code review, OpenAI docs, read Nov 6, 2026
- Long-running work, OpenAI docs, read Nov 6, 2026
- Models, OpenAI docs, read Nov 6, 2026
- Pricing, OpenAI docs, read Nov 6, 2026
- MCP, OpenAI docs, read Nov 6, 2026
- Windows WSL, OpenAI docs, read Nov 6, 2026
- Changelog, OpenAI docs, read Nov 6, 2026
- Codex | AI Assistant, JetBrains, last modified Oct 7, 2026, read Nov 6, 2026
Photos
See also
-
Codex Pricing and LimitsCodex comes with every ChatGPT plan as of Nov 6, 2026: Free ($0) and Go ($8) get GPT-6 Luna in the desktop app, Plus ($20) gets about 15 to 160 GPT-6.1 Sol messages per five hours plus Codex Cloud, and Pro ($100, $200 or $500) has no five-hour limit. Credits extend any plan, and an API key bills by the token instead.
-
CodexCodex is OpenAI's coding agent: it reads a codebase, edits files, runs commands and tests, reviews pull requests and works in the cloud. As of Nov 6, 2026 it lives inside the ChatGPT desktop app, in the Codex CLI, in IDE extensions, in Codex Cloud and on mobile, and every ChatGPT plan includes some of it, Free and Go too.
-
Codex AppThe Codex app is now the Codex view of the ChatGPT desktop app for macOS, Windows and Linux, where Codex runs parallel chats, worktrees, Computer Use, Appshots, Goal mode, Record and Replay and remote control from a phone. It replaced the standalone Codex app OpenAI launched on Feb 2, 2026. -
Codex CLICodex CLI is OpenAI's open-source coding agent for the terminal: install it with one command, run codex in a project folder, sign in with ChatGPT or an API key, and it reads, edits and runs your code inside a sandbox. This page covers its commands, models, approval modes, config.toml, codex exec, resume and MCP as of Nov 6, 2026. -
Codex Code ReviewCodex code review posts a GitHub review on your pull requests when you comment @codex review or turn on automatic reviews at chatgpt.com/settings/code-review; it flags only P0 and P1 issues and follows Code Review Rules in your AGENTS.md. GitLab merge requests are in beta, and Codex also reviews local changes with /review and works from Slack, Linear and a GitHub Action. -
Codex CloudCodex Cloud runs OpenAI's coding agent on OpenAI's servers: you connect GitHub repositories, publish a cloud environment, and start tasks from ChatGPT on the web, the desktop app or a phone, each in its own workspace that keeps working while your computer sleeps. It needs ChatGPT Plus or higher; Free and Go do not include it.