Codex ignores VSCode selected Python interpreter / virtual environment

Open 💬 4 comments Opened May 20, 2026 by magnetix-cgn

What version of the IDE extension are you using?

26.513.21555

What subscription do you have?

ChatGPT Plus

Which IDE are you using?

Visual Studio Code

What platform is your computer?

Linux chaosframe 6.x x86_64 GNU/Linux

What issue are you seeing?

Codex appears to ignore the Python interpreter selected in VSCode and instead uses the system Python interpreter.

Expected behavior:
When selecting a project-local virtual environment via:

Python: Select Interpreter

for example:

./xvx-venv/bin/python

Codex should inherit and use that interpreter/environment.

Observed behavior:
Codex uses:

/usr/bin/python

instead of the selected venv interpreter.

What steps can reproduce the bug?

Reproduction steps:

Create a project-local virtual environment:
python3 -m venv xvx-venv
Select the interpreter in VSCode:
./xvx-venv/bin/python
Open Codex inside VSCode
Ask Codex:
which python

Result:
/usr/bin/python

What is the expected behavior?

./xvx-venv/bin/python

Additional information

For any questions: magnetix@xvx-systems.de

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗