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".

A dark code editor showing a diff of changed files beside a Codex side panel with a preview image and an edited files list
A dark code editor showing a diff of changed files beside a Codex side panel with a preview image and an edited files list OpenAI

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?

  1. In VS Code, Cursor or Windsurf, open the Extensions view and install OpenAI's extension (id openai.chatgpt), or open the Marketplace page.
  2. Select the Codex icon in the sidebar. If you cannot see it, open the Command Palette and run Codex: Open Codex Sidebar.
  3. On the signed-out screen select Sign in with ChatGPT and finish in the browser, or sign in with an API key.
  4. 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. /ide pulls 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. /review reviews 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 TODO comments lets Codex address them (setting chatgpt.commentCodeLensEnabled) (Developer settings).
  • Works toward a goal. /goal starts 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

Photos

A dark code editor showing a diff of changed files beside a Codex side panel with a preview image and an edited files list

See also

About this page

Last updated Nov 6, 2026 by the Vi.ki team. Page text CC BY-SA 4.0.

Edit History

Hotkeys

/
Jump to the search box
? or Ctrl + /
Open this list
Esc
Close this list, the photo viewer, or the account menu

Photo viewer

← → or A D
Previous or next photo
↑ ↓ or W S
Previous or next photo
Home End
First or last photo
I
Show or hide the photo's info
Z
Clickless on or off: a pointer over a thumbnail shows it
N
Compare with the last photo: back to the one shown before this, and N again comes back
Q
Move the thumbnails to the next edge: top, bottom, left and round
, or Ctrl + ,
Open or close the viewer's settings
V
Clickless pan: a zoomed photo follows the pointer, rather than being dragged
Shift
Browse on or off
B
Show or hide the button bar
T
Show or hide the thumbnails
1
100% zoom on or off
0
Rate the photo as no opinion; again takes the answer back
+ -
Rate the photo a step higher or lower
F
Full screen: the photo alone. F again puts everything back.
Back to top