The Codex IDE extension in VS Code, and what the docs actually specify
Install the Codex extension in VS Code, Cursor or Windsurf, open the sidebar, choose between local work and delegating to Codex web, and see which panel behaviors are documented.
Contents
Codex is not only a CLI — there is an IDE extension that puts it in a sidebar next to your code. This article covers what the official documentation specifies about it, and marks the parts it does not.
That distinction matters here: the IDE page is short, and several behaviors people assume are documented are not.
KEY POINT
What you will learn
- Installing the extension and opening the sidebar, in VS Code, Cursor or Windsurf
- What the docs do and don't say about the panel
- Choosing between local work and delegating to Codex web
Install and open the sidebar
What the documentation states is two things: "VS Code and compatible editors use the Codex extension", and "Install or enable Codex, sign in, and start a chat with the context already open in your editor."
- Install the Codex extension from the Visual Studio Marketplace. The editors named are "VS Code, Cursor, or Windsurf".
- Choose the Codex icon to open the sidebar. If the icon isn't visible, run Codex: Open Codex Sidebar from the Command Palette.
- Sign in. The chat starts with the context already open in your editor.
You need a paid ChatGPT plan or an API key. For how sign-in interacts with OPENAI_API_KEY, see Set up Codex CLI and write an AGENTS.md that Codex actually reads.
The sign-in flow is not documented step by step
Earlier versions of this article described a "Sign in with ChatGPT" button opening a browser. The current official IDE page does not describe the sign-in steps, and on-screen wording changes between versions, so this article sticks to what the docs state.
Working in the panel
The documented point is that the chat starts with the context already open in your editor. Beyond that, the panel gives you:
| Action | What it does |
|---|---|
| Write an instruction | Type it in the input |
| Review a diff | Look at the files Codex changed |
| Approve | Allow or refuse an action that needs approval |
| Switch conversations | Start a new one to separate tasks |
Individual panel features could not be confirmed
@ file references, passing the current selection, and switching models from inside the panel are not described on the official IDE page as of 2026-10-17. Your installed extension may well offer them; this article does not state them as specification.
Things that do help, from what is documented:
- Open the file first. "Start a chat with the context already open in your editor" — beginning with the relevant file open means less to explain.
- Keep AGENTS.md in shape. Commands and conventions written there don't need repeating per task.
- Split the work in two. Ask for the approach first, confirm it, then ask for the implementation. Less re-work.
Local work or Codex web
| Local | Cloud | |
|---|---|---|
| Where it runs | Your workspace | A container on OpenAI's side, from a clone of the repository |
| How changes land | Files change directly | Changes and test results to review, then a pull request |
| Waiting | Interactive | Runs in the background; you check when it's done |
| Suits | Interactive implementation and debugging | Longer, independent tasks |
The documentation's own framing: "Choose local work for fast, hands-on iteration, or connect Codex web to delegate a longer task." For the cloud side, see Hand GitHub work to Codex Cloud.
Whether the extension itself can start and manage cloud tasks isn't stated on the IDE page. For the CLI, the docs do say you can "Start a task from your terminal, or list recent cloud chats and check their status."
Approval and sandbox settings
The approval and sandbox keys are in the configuration reference. In ~/.codex/config.toml:
approval_policy = "on-request"
sandbox_mode = "workspace-write"
For what each combination means, see Codex approval modes and sandbox settings.
Whether the extension reads this file is not documented
config.toml is documented as Codex CLI's configuration file. The official IDE page does not say whether the VS Code extension reads the same file. If you have loosened approvals on the CLI side, check the extension's actual behavior rather than assuming it inherits them.
Compared with the Claude Code extension
Claude Code has a VS Code extension too. They feel similar, but the cloud integration, the approval model and the configuration file format all differ. For a comparison, see Codex versus Claude Code.
Summary
- Install from the Marketplace and open the sidebar with the Codex icon, or Codex: Open Codex Sidebar from the Command Palette
- Named editors are VS Code, Cursor and Windsurf; the chat starts with your open editor context
- Interactive work stays local; longer tasks get delegated to Codex web
@references, panel model switching and whether the extension readsconfig.tomlcould not be confirmed in the official IDE documentation
FAQ
- Do I need Codex CLI as well as the extension?
- No, the extension works on its own. The CLI is useful when you want config.toml settings or non-interactive runs.
- Does it work in Cursor?
- Yes. The documentation names "VS Code, Cursor, or Windsurf". If the Codex icon isn't visible, run "Codex: Open Codex Sidebar" from the Command Palette.
- Local work or Codex web?
- The docs frame it as "Choose local work for fast, hands-on iteration, or connect Codex web to delegate a longer task." Local changes your files directly; cloud work comes back as changes to review and a pull request.
- Does the extension read ~/.codex/config.toml?
- That could not be confirmed. config.toml is documented as the CLI's configuration file, and the IDE page does not say whether the extension reads it.
Primary sources
This article was drafted by AI from official documentation and reviewed by the site operator before publishing. Found a mistake? Let us know via the contact page.