Install Codex in your editor

In VS Code, Cursor, or Windsurf, install the official Codex extension, published as openai.chatgpt, from the marketplace. Click the Codex icon or run 'Codex: Open Codex Sidebar', then sign in. JetBrains IDEs and Xcode don't use this extension. Choose Codex as the agent in JetBrains AI Chat, or in Xcode's coding assistant.

Applies to: VS Code, Cursor, Windsurf, JetBrains IDEs, Xcode

VS Code, Cursor, and Windsurf

  1. Open the official listing: openai.chatgpt on the VS Code Marketplace. In Cursor or Windsurf, search their extension panel for the same ID.
  2. Check that the publisher is OpenAI, then install.
  3. Click the Codex icon in the sidebar. If it isn’t visible, open the Command Palette and run Codex: Open Codex Sidebar.
  4. Choose Sign in with ChatGPT, or Use API Key.

JetBrains IDEs

JetBrains provides its own Codex integration. Open AI Chat and select Codex as the agent. Setup steps are in JetBrains’ Codex agent guide.

Xcode

Open the coding assistant, start a new chat, and choose Codex as the agent. Apple documents setup in Setting up coding intelligence.

Get the most out of it

  • Add open files or a selection to the composer so Codex starts from the code you’re looking at.
  • Review the diff in place and keep only the changes you want.
  • Hand longer tasks to Codex cloud from the same chat, and come back to the result later.
  • Make a Git checkpoint before and after each task. OpenAI recommends this in its best practices.

Settings such as model, approval policy, and sandbox mode come from the shared config.toml.

Questions people ask

What is the extension's exact ID?

openai.chatgpt. Check the publisher is OpenAI before installing. Look-alike extensions with similar names exist in most marketplaces.

Where is the config file when I use the extension?

The extension uses the same config.toml as the CLI. Open it from the gear icon, then Codex Settings, then Open config.toml.

Sources

We link to the official source for every instruction on this page. If anything here disagrees with them, trust the official source and tell us.