Claude Code and Codex in VS Code: install the extensions and get started
How to install the Claude Code and Codex extensions in VS Code or Cursor, open them, sign in, and what each extension does differently from the CLI.


The short answer
Both have an official VS Code extension. Open the Extensions view (Cmd+Shift+X on a Mac, Ctrl+Shift+X elsewhere), search for Claude Code or Codex, and install the one published by Anthropic or OpenAI. Open it from its icon and sign in with the same account you'd use for the CLI. The same extensions install in Cursor too.
| Claude Code | Codex | |
|---|---|---|
| Extension | Claude Code, by Anthropic | Codex, by OpenAI (openai.chatgpt) |
| Editors | VS Code 1.94 or later, Cursor, and other VS Code forks through Open VSX | VS Code, Cursor, Windsurf, VS Code Insiders; Xcode and JetBrains have their own integrations |
| Account | Any paid Claude plan or an Anthropic Console account; no API key needed | A ChatGPT plan from Plus up, or an API key |
| Open it | The Spark icon in the editor toolbar, the Activity Bar or the status bar | The Codex icon, or Codex: Open Codex Sidebar in the Command Palette |
Claude Code in VS Code
- Install and open it
Install Claude Code from the Extensions view, then click the Spark icon at the top right of an open file. If it doesn't show up, run Developer: Reload Window from the Command Palette.
- Sign in
The first time, click Sign in and finish in your browser.
- Ask with your selection
Claude sees the text you have selected. Press Option+K (Alt+K on Windows and Linux) to insert a reference such as @file.ts#5-10 into the prompt.
- Review the changes
The permission mode is shown under the prompt box. In Manual mode, Claude shows the original and the proposed change side by side and asks before editing.
Article · How to install Claude Code on macOS, Windows and Linux → Installing the Claude Code CLI, and fixing claude: command not found.
Codex in VS Code
- Install and open it
Install Codex (openai.chatgpt) from the Extensions view and click the Codex icon. If you don't see it, run Codex: Open Codex Sidebar from the Command Palette.
- Start with what's open
Add an open file, your selection or a recent chat to the message, then ask Codex to explain the code or make a focused change. Commit before and after, so you can go back.
- Review in place
Codex shows a summary and the changed lines next to your code; keep the edits you want and follow up in the same chat. For a longer task, hand it to Codex in the cloud and come back to the result.
On Windows, if the extension is installed but doesn't respond, OpenAI's fix is to install Visual Studio Build Tools with the C++ workload and restart VS Code.
Article · How to use Codex: your first task, permissions, and the commands you'll use → Prefer the terminal? How to use the Codex CLI.
Both agents side by side, then open it in VS Code
The extensions each run one agent inside the editor. Mira is a desktop app that runs Claude Code, Codex and other agents in panes next to each other, each session with the workspace's file tree and an editor. When you want your own editor, open the workspace in VS Code, Cursor or Zed from Mira. Mira is not an Anthropic or OpenAI product.
Article · Claude Code vs Codex: how they differ, and using both → Claude Code and Codex compared, and running both.
Article · Claude Code desktop vs CLI: what differs, and which to use → Not using an editor? Claude Code's desktop app compared with the CLI.
Article · Cursor alternatives: coding agents with their own apps → Thinking of leaving Cursor? Coding agents you can use instead, and where each runs.
Questions
- Do I need an API key for the Claude Code extension?
- No. A paid Claude plan or an Anthropic Console account is enough; you sign in when you first open it.
- Can I use these extensions in Cursor?
- Yes. Both Anthropic and OpenAI list Cursor as a supported editor for their extensions.
- Extension or CLI?
- The extension keeps the agent next to the code you're reading. The CLI also runs in scripts and on servers without a desktop. Both sign in with the same account.
Sources
Checked on November 25, 2026 against code.claude.com/docs/en/vs-code and learn.chatgpt.com/docs (the Codex IDE extension page, pricing and Windows pages). The extensions change quickly, so check those pages for the latest.
Keep reading

Fixing OpenAI and Codex 403 “unsupported_country_region_territory”
Why OpenAI and Codex return 403 unsupported_country_region_territory, how to fix false positives on VPNs or cloud IPs, and compliant alternatives.

Running Claude Code and Codex on Amazon Bedrock, Vertex AI, and Microsoft Foundry
Connect Claude Code and Codex to Amazon Bedrock, Vertex AI, and Microsoft Foundry: env vars, config.toml, auth, model pinning, and limits.

Using Claude Code with Chrome and Codex Browser: live debugging, Playwright, and previews
How to connect Claude Code to Chrome (extension, console logs, login limits) and use Codex Browser or Playwright, plus live dev-server previews in Mira.