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

Azure DevOps/ GitHub emoji

I’m really bad at remembering emoji’s. So here is cheat sheet with all emoji’s that can be used in tools that support the github emoji markdown markup: All credits go to rcaviers who created this list.

Kubernetes–Limit your environmental impact

Reducing the carbon footprint and CO2 emission of our (cloud) workloads, is a responsibility of all of us. If you are running a Kubernetes cluster, have a look at Kube-Green . kube-green is a simple Kubernetes operator that automatically shuts down (some of) your pods when you don't need them. A single pod produces about 11 Kg CO2eq per year( here the calculation). Reason enough to give it a try! Installing kube-green in your cluster The easiest way to install the operator in your cluster is through kubectl. We first need to install a cert-manager: kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.14.5/cert-manager.yaml Remark: Wait a minute before you continue as it can take some time before the cert-manager is up & running inside your cluster. Now we can install the kube-green operator: kubectl apply -f https://github.com/kube-green/kube-green/releases/latest/download/kube-green.yaml Now in the namespace where we want t...

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         ...