10uGet early access
10u / codex-vs-code

Codex VS Code extension: install it and use Codex in your editor

Codex runs inside VS Code through OpenAI's Codex IDE extension, listed on the Visual Studio Marketplace as openai.chatgpt. It puts a Codex chat in a sidebar beside your code, so you can add open files and selections to the prompt, review Codex's edits as diffs next to the source, and hand longer work to Codex in the cloud without leaving the editor. The same extension works in Cursor, Windsurf and VS Code Insiders. This guide covers installing it, the commands and slash commands, and every editor setting OpenAI documents.

Codex in VS Code: the Codex sidebar beside an open file, with the Command Palette showing Codex: Open Codex Sidebar
Codex in VS Code: the Codex sidebar beside an open file, with the Command Palette showing Codex: Open Codex Sidebar

Source: Codex IDE extension, OpenAI docs

Install the Codex extension in VS Code

  1. Open the Extensions view in VS Code and search for Codex, or open the openai.chatgpt page on the Visual Studio Marketplace and choose Install.
  2. Choose the Codex icon in the activity bar. If you cannot see it, open the Command Palette (Cmd+Shift+P on macOS, Ctrl+Shift+P on Windows and Linux) and run Codex: Open Codex Sidebar.
  3. Sign in when the extension asks, for example with your ChatGPT account.
  4. Open a project and start a chat: ask Codex to explain the codebase, make a focused change, or help debug an issue.

OpenAI's advice for the first task is the same as in the CLI: create Git checkpoints before and after a task so you can revert Codex's changes if you do not want them.

Source: Codex IDE extension, OpenAI docs

Other editors

EditorHow you get Codex
Visual Studio CodeThe Codex extension, openai.chatgpt
VS Code InsidersThe same extension from the Marketplace
CursorThe same extension, installed from Cursor's extension view
WindsurfThe same extension, installed from Windsurf's extension view
XcodeApple's own coding assistant: start a new chat and choose Codex as the agent
JetBrains IDEsJetBrains AI Chat: select Codex

Source: Codex IDE extension, OpenAI docs

What Codex does inside VS Code

  • Uses the context already open: add an open file, a selection or a recent chat to the composer, so Codex starts with the code you are looking at instead of you restating the problem.
  • Reviews changes beside your code: read a short summary and the changed lines, keep the edits you want, and ask for a follow-up in the same chat.
  • Delegates when a task grows: keep quick iterations local, or connect Codex web and send a longer task to the cloud, then come back to a reviewable result in the editor.

OpenAI suggests the extension for focused edits where the relevant files and Codex should share one view, for learning unfamiliar code by asking about the files and symbols already open, for reviewing changes in place, and for starting cloud work from the editor.

Source: Codex IDE extension, OpenAI docs

Codex extension commands and key bindings

These commands run from the VS Code Command Palette, and each can be bound to a keyboard shortcut:

Command IDDefault key bindingWhat it does
chatgpt.addToThreadNoneAdd the selected text as context for the current chat
chatgpt.addFileToThreadNoneAdd the whole file as context for the current chat
chatgpt.newChatCmd+N on macOS, Ctrl+N on Windows and LinuxCreate a new chat
chatgpt.newCodexPanelNoneCreate a new Codex panel
chatgpt.openCommandMenuNoneOpen the Codex command menu
chatgpt.openSidebarNoneOpen the Codex sidebar panel

To set a shortcut, open the Command Palette, run Preferences: Open Keyboard Shortcuts, search for Codex or a command ID such as chatgpt.addToThread, select the pencil icon and press the keys you want. Binding chatgpt.addToThread is the quickest way to send a selection to Codex.

Source: Codex IDE extension commands, OpenAI docs

Slash commands in the Codex VS Code extension

Type / in the Codex composer, pick a command or keep typing to filter, and press Enter.

Slash commandWhat it does
/approveApprove one retry of a recent automatic-review denial
/cloudRun the chat in the cloud, when cloud execution is available
/cloud-environmentChoose the cloud environment for the chat
/compactCompact the chat's context
/fastTurn a Fast service tier on or off, when available
/feedbackSend feedback, optionally with logs
/forkCopy a local chat into a new local chat
/goalSet a persistent goal for Codex to work toward
/ide-contextTurn automatic IDE context on or off
/initGenerate an AGENTS.md scaffold for the project
/localRun the chat in your local workspace
/mcpShow connected MCP servers
/memoriesChoose whether the chat can use or create memories
/modelChoose the model for the chat
/planToggle plan mode for multi-step planning
/projectChoose a project for new chats
/reasoningChoose the reasoning effort
/reviewReview uncommitted changes or compare against a base branch
/sideStart a temporary side chat without interrupting the main one
/statusShow the chat ID, context usage and rate limits
/worktreeRun the chat in a new Git worktree

Source: Codex IDE extension commands, OpenAI docs

Codex VS Code settings

The extension has two layers of settings. Codex settings control agent behaviour it shares with the Codex CLI, such as the model, reasoning effort, permissions, sandbox, MCP servers and personalisation, and are read from config.toml. Open them from the gear icon in the Codex sidebar, then Codex Settings, or choose Open config.toml to edit the file. Editor settings control how the extension behaves inside VS Code and use chatgpt.* keys: open your editor settings and search for @ext:openai.chatgpt.

Editor settingDefaultWhat it does
chatgpt.commentCodeLensEnabledtrueShows a CodeLens above TODO comments so Codex can address them
chatgpt.openOnStartupfalseFocuses the Codex sidebar when the extension starts
chatgpt.followUpQueueModequeueMessages sent during a run wait for the next run (queue) or steer the current one (steer)
chatgpt.composerEnterBehaviorenterEnter always sends, Cmd or Ctrl+Enter sends multiline prompts, or the modifier is always required
chatgpt.reviewDeliveryinlineRuns /review in the current chat (inline) or a separate review chat (detached)
chatgpt.localeOverrideAutoSets the language of the Codex UI
chatgpt.runCodexInWindowsSubsystemForLinuxfalseWindows only: runs Codex in WSL; changing it reloads VS Code
chatgpt.cliExecutableUnsetDevelopment only: a path to a Codex CLI build; overriding it can break parts of the extension
chat.fontSizeEditor defaultSize of chat text and the composer
chat.editor.fontSizeEditor defaultSize of code snippets and diffs in chats

The chatgpt.* keys belong to the extension and do not go in config.toml; anything you set in config.toml, such as the default model or sandbox, applies to the CLI and the extension alike.

Source: Codex IDE extension settings, OpenAI docs

Codex in VS Code on Windows

If your repositories and tools live in WSL2, or you need Linux-native tooling, turn on chatgpt.runCodexInWindowsSubsystemForLinux. The extension then runs Codex inside WSL when WSL is available, and VS Code reloads when you change the setting.

Source: Codex IDE extension settings, OpenAI docs

Codex VS Code extension or the Codex CLI?

They share the same agent and the same config.toml, so the choice is about where you work. The extension suits focused edits with files open and diffs reviewed in place. The CLI suits terminal-first work, scripting with codex exec and running several sessions at once. You can use both on the same repository.

Source: Codex IDE extension, OpenAI docs

Several Codex chats at once

Once you run more than one Codex chat, across editor windows and terminals, it is easy to miss the one waiting on you. 10u is an AI coding agent dashboard that shows every Codex and Claude Code session side by side, each in its real terminal, marked Needs you, Working, Waiting or Parked. They do the building. You decide what gets built.

10u: every sample agent side by side under its goal, with the ones waiting on you marked
10u: every sample agent side by side under its goal, with the ones waiting on you marked

Questions people ask

Is there a Codex extension for VS Code?
Yes. OpenAI's Codex IDE extension is on the Visual Studio Marketplace as openai.chatgpt, and also works in Cursor, Windsurf and VS Code Insiders.
How do I open Codex in VS Code?
Choose the Codex icon in the activity bar, or run Codex: Open Codex Sidebar from the Command Palette.
How do I add a file to a Codex chat?
Run chatgpt.addFileToThread for the whole file or chatgpt.addToThread for a selection, or bind either to a keyboard shortcut.
Where are the Codex VS Code settings?
Agent settings are in config.toml, opened from the gear icon then Codex Settings. Editor settings use chatgpt.* keys; search @ext:openai.chatgpt in your editor settings.
Can Codex in VS Code run in WSL?
Yes. Turn on chatgpt.runCodexInWindowsSubsystemForLinux and the extension runs Codex inside WSL when it is available.

10u is in early access. Leave your email and we will let you in as places open.