Introducing the Codex IDE extension

Introducing the Codex IDE extension—pair with Codex inside VS Code (and compatible forks) to build faster, fix bugs, and understand unfamiliar code. Codex can read, edit, and run code in your workspace, uses your open files and selections for precise context, and lets you choose how hands-on it is with Agent, Chat, or Agent (Full Access).

With a ChatGPT subscription you can use Codex without an API key.

  • Work inside your editor:
    Read, edit, and run code directly in VS Code using file/selection context for shorter prompts and more relevant results.
  • Approval modes:
    By default, Agent can read/edit/run in the working directory and will request approval to access anything outside it or the network. Use Chat to plan first; Agent (Full Access) enables network and broader access—use with caution.
  • Cloud delegation:
    Offload bigger jobs to managed environments and review diffs without leaving your editor; Codex keeps conversation context between local and cloud.
  • Platforms & editors:
    macOS and Linux supported; Windows is experimental (best via WSL). Works with VS Code, VS Code Insiders, Cursor, and Windsurf.
  • Accounts & setup:
    Sign in with a ChatGPT Plus, Pro, Team, Edu, or Enterprise plan for the best experience; an API key is also supported with extra setup.
  • Open-source core:
    Built on the open-source Codex CLI.

What platforms are supported?

The Codex VS Code extension is available on macOS and Linux.

Windows support is still experimental. Currently, the best experience on Windows is to use Codex with the Windows Subsystem for Linux.

All Download links can be found at the top of the official announcement.

10 Likes

Love Codex! Looking forward to better Windows support.

9 Likes

Getting the error - Sign-in failed: {“code”:-32603,“message”:“failed to start login server: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)”} - VS Code in Windows. Logged in via wsl to codex.

2 Likes

How about JetBrains IDEs?

4 Likes

I have a bug, none of my local chat sessions are getting saved and they don’t appear in history, even if I select the local dropdown in history. I can only see cloud history. Lost all my context on improvements =/

How about the Codex Cloud? Does it still use O3? Or GPT 5 too?

Getting the same error as well. Trying to login via VS code in Codex extension:

Sign-in failed: {“code”:-32603,“message”:“failed to start login server: An attempt was made to access a socket in a way forbidden by its access permissions. (os error 10013)”}

Something must be computer related, as I managed yesterday to login at different computer (at work).

1 Like

Getting Error starting conversation” in new Codex VS Code extension when initializing a chat in an windows 11 machine

Can you give more detail on the API key setup @vb ? What exactly do we need to do for API keys to function? I’m just getting “You’ve hit your usage limit.” failures after using the ChatGPT account via login, and would like to pivot to using an API key. Thanks!

1 Like

Found how to fix this, I confirm it is working for me:

Just run these commands as administrator:
netsh int ipv4 set dynamicport tcp start=49152 num=16384
netsh int ipv6 set dynamicport tcp start=49152 num=16384
*restart your computer*

2 Likes

You can create an API key in the dashboard. To use it, make sure you’ve also added credits to your account, since API usage is billed separately from your ChatGPT subscription.

The “usage limit” errors you’re seeing are likely due to shared rate limits between the ChatGPT apps and Codex. Once your ChatGPT subscription limits reset, things should return to normal—but switching to an API key with credits will give you a separate usage path for the API.

Edit: I saw too late that you already solved the issue here.

How do I provide the API key to Codex in VS code though? With Codex CLI I set the OPENAI_API_KEY variable, but what do I do with here? Also my vscode runs on Windows and remotely connects to Linux. I created .codex/config.toml on Linux but I guess I also need to create auth.json? What’s the syntax? Or is there a better/easier way to do it?

I have a request: can you make previous chats available in codex VS Code extension? If I restart VS Code all local chats disappear.

1 Like

Hi!
You can read up on the process in more detail here:

I think they are talking about using Codex with the API. I am not using an API to access codex, I am using my regular subscription.

The extension is not loading in VS Code on Windows 11 after installing it.

We just switched to github copilot because this wasn’t supported in codex. Good improvement to be made, will definitely keep a close eye on this.

Developers empowered to not have to open a browser is a major plus one for us.

Is there a setting we can use to preserve local chat history, perhaps writing to a local log file? As it currently stands, local history disappears on VSCode reload/restart and all I’m left with is my commit history which lacks the rationale for the PR.

1 Like

+1 on this. Preserving the local chat history on reload. Also wpuld be awesome if this is optionally synced with the cloud version.

Why is this still bugged with how fast u can code with codex in vscode??? Use your own product and fix the bugs, PLEASE

1 Like