Here are the steps I took to get Codex extension working in VSCode:
-
Quit VSCode.
-
Edit the file
~/.codex/config.tomlto include the following:
preferred_auth_method = "apikey"
- Open the file
~.codex/auth.jsonand delete all the contents. Save. - In terminal export your OpenAI key:
% export OPENAI_API_KEY="your-api-key-here"
- Start VSCode:
% code .
- Install the Codex extension. And login using “Use API Key”:
