Codex VS Code extension fails to recognize the file I’ve opened or the code I’ve selected

Resolved 💬 2 comments Opened Jan 31, 2026 by 99zhangpengxiang Closed Jan 31, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of the VS Code extension are you using?

0.4.68

What subscription do you have?

pro

Which IDE are you using?

vacode

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What issue are you seeing?

在最新的codex版本中,我发现打开项目后,选中代码块后,codex无法识别我选中的代码块,甚至无法识别我打开的文件;

<img width="2902" height="1444" alt="Image" src="https://github.com/user-attachments/assets/0d61a07e-4926-4ea0-843d-de39700672a9" />

What steps can reproduce the bug?

vscode打开任意可编辑文件后,向他提问

What is the expected behavior?

_No response_

Additional information

_No response_

View original on GitHub ↗

2 Comments

etraut-openai contributor · 6 months ago

English Translation: After opening a project in VS Code and selecting a block of code, the Codex extension does not detect the file you have open, and it also fails to recognize the code you’ve selected.

etraut-openai contributor · 6 months ago

The problem is that you've disabled the "auto context" feature. Click on the icon to the left of the submit. It will turn blue if "auto context" is enabled.

<img width="155" height="76" alt="Image" src="https://github.com/user-attachments/assets/03b25cfd-56f0-4bd5-af0d-6d8a4725cca0" />