Skip to main content

Giving OpenAI codex a try in VSCode

At GitHub Universe, GitHub announced that you can use OpenAI Codex with your existing GitHub Copilot Pro+ subscription.

Therefore we first need to install the OpenAI Codex extension and sign in with GitHub Copilot.

Installation & configuration

You can directly install the extension from the extensions or through the Agent sessions view:

After the installation has completed, you need to sign in. You can either use your ChatGPT account or your (existing) GitHub Copilot subscription.

Once signed in, we have an extra chat window available:

There are a few things we can configure here:

  • Environment:
    • Local workspace: The agent will interact with your local machine and VSCode workspace.
    • Connect Codex Web: Send the chat to the ChatGPT web interface.
    • Send to cloud: The agent will operate in a sandboxed cloud environment.

 

  • Chat Mode (called approval modes in OpenAI Codex):
    • Chat: Regular chat, doesn’t do any changes directly.
    • Agent: The Codex agent can read files, make edits, and run commands in the working directory automatically. However, it needs approval to work outside the working directory or access the internet network.
    • Agent (Full Access): The Codex agent is allowed to read files, make edits, and run commands with network access, without approval.

 

  • Models:
    • Select any of the available OpenAI models

 

  • Reasoning effort:
    • You can adjust the reasoning effort of Codex to make it think more or less before answering.
    • Remark: In my case this option is disabled, probably because I’m using a GitHub Copilot subscription.

You can further tweak Codex through the config.toml file. Therefore click on the gear icon in the top right corner of the extension and then clicking Codex Settings > Open config.toml.

 

Our first interaction

The basic interactions are quite similar to any other AI agent in your IDE. We can ask it to do a review for example:

Notice that the Codex agent is using ‘Auto Context’ and limits its review to the active open file in VS Code.

Codex also supports a (limited) set of slash commands to execute common and specific tasks:

 

You can monitor the amount of tokens used by hovering over the icon in the right corner of the chat window:

My feedback

I only spent a limited amount of time using the Codex extension so don’t see this as a full review. Being used to having GitHub Copilot as an integrated part of my development experience, I found the Codex extension quite limited. It felt mostly like a command line tool with a minimum shell built on top of it. MCP server integration, slash commands, IDE integration, … all felt a bit more cumbersome compared to what I’m used of.

The output itself is quite good so no complaints there.

One feature that stood out for me is the sandbox mode. In this mode, Codex will work in a restricted environment and do the following:

  • Launches commands inside a restricted token derived from an AppContainer profile.
  • Grants only specifically requested filesystem capabilities by attaching capability SIDs to that profile.
  • Disables outbound network access by overriding proxy-related environment variables and inserting stub executables for common network tools.

Another option you have is to run Codex inside WSL which they recommend:

 

Remark: Important to notice is that we are not talking about the OpenAI GPT 5 Codex model which can be used directly from the list of available models in GitHub Copilot.

More information

Codex IDE extension

Codex – OpenAI’s coding agent - Visual Studio Marketplace

Popular posts from this blog

Podman– Command execution failed with exit code 125

After updating WSL on one of the developer machines, Podman failed to work. When we took a look through Podman Desktop, we noticed that Podman had stopped running and returned the following error message: Error: Command execution failed with exit code 125 Here are the steps we tried to fix the issue: We started by running podman info to get some extra details on what could be wrong: >podman info OS: windows/amd64 provider: wsl version: 5.3.1 Cannot connect to Podman. Please verify your connection to the Linux system using `podman system connection list`, or try `podman machine init` and `podman machine start` to manage a new Linux VM Error: unable to connect to Podman socket: failed to connect: dial tcp 127.0.0.1:2655: connectex: No connection could be made because the target machine actively refused it. That makes sense as the podman VM was not running. Let’s check the VM: >podman machine list NAME         ...

Cache stampede: when our cache turned against us

While investigating some performance issues, we ran into an ASP.NET Core API that cached a fairly expensive aggregation query for 60 seconds. Under normal load, that was fine: one request rebuilds the cache, everyone else reads from it. Under peak load, dozens of requests would arrive in that same expiry window, all see a cache miss, and all fire the same expensive query in parallel. The database didn't like that. That was the moment when our caching layer stopped helping and started hurting. A burst of requests comes in at the same time, all miss the cache, and all go hammer the database or the downstream API at once. That's a cache stampede . The cache was supposed to protect our backend, and for a few hundred milliseconds it did the opposite. Why this happens IMemoryCache.GetOrCreate (and its async sibling) looks like it protects you, but it doesn't add any locking on its own. Look at the naive version: public async Task<Report> GetReportAsync(string key) ...

A complex system designed from scratch never works

A few years ago, I worked as an architect on a big mainframe rewrite. I still count it as one of my failures. Not because the technology was wrong, but because I couldn't convince the management team to simplify the approach. Years later, the organization is still struggling to get the new system up and running. I left the project at the time, because I couldn't put my name behind an approach that would take very long and cost a lot of money without a working system to show for it along the way. Gall’s Law That memory keeps coming back to me, because it's a textbook case of Gall's Law playing out in real life. Gall's Law , from John Gall's Systemantics , states it plainly: A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works, and it cannot be patched to make it work. You have to start over with a simple system that works. What does that mean in practice,...