VS Code OpenAI codex keeps asking for permissions: Approve Once, Approve This Session, Reject.

Open 💬 7 comments Opened Jan 28, 2026 by processguy
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

GPT-5.1 Codex-Max

What subscription do you have?

OpenAI Chat Pro

Which model were you using?

GPT-5.1 Codex-Max

What platform is your computer?

Windows

What terminal emulator and version are you using (if applicable)?

VS Code

What issue are you seeing?

VS Code OpenAI codex keeps asking for permissions: Approve Once, Approve This Session, Reject. It does not response to Approve This Session, just keeps repeating the ask. This was broken a couple of months ago. Then it was fixed, and in the last week or so, it’s not working again.

What steps can reproduce the bug?

Start VS Code, Select OpenAI, enter a prompt that needs to do repository search.

What is the expected behavior?

It ought to accept this session and not keep asking during the same process.

Additional information

_No response_

View original on GitHub ↗

7 Comments

etraut-openai contributor · 5 months ago

If you haven't already done so, please enable the Windows experimental sandbox. Without a sandboxing mechanism, all tool calls need to be manually approved.

marksagangms-debug · 5 months ago
If you haven't already done so, please enable the Windows experimental sandbox. Without a sandboxing mechanism, all tool calls need to be manually approved.

How about on mac?

processguy · 5 months ago

Did not have to install sandbox before. Don't want to do it now. Diddling the innards like this significatnly increases the complexity of using this as a general coding tool.

antondeulia · 4 months ago

Well, I don’t know about the sandbox and whether it will work or not. I just built this app:
https://github.com/antondeulia/HighGround

(Which, unfortunately, you still need to install 🙂)

This solved the issue for me, and I’m happy. It submits buttons in multiple VS Code instances, even when they are minimized. The only thing is that you need to start your VS Code instance with the flag --remote-debugging-port=9222 (or you can just start it through the button in my app, which launches it with this port automatically).

By the way, I tried Codex on Mac and Linux, and it stopped asking me for approval after I added the -full-access flag in the TOML file. However, the same thing doesn’t work on Windows. (Anyway, my app currently works only on Windows, which is fine.)

pythonaddict · 4 months ago

Use Pycharm with AI Chat plugin. Unlike Visual Studio Code, Codex in PyCharm doesn't ask you for confirmations for simple commands.

antondeulia · 4 months ago
Use Pycharm with AI Chat plugin. Unlike Visual Studio Code, Codex in PyCharm doesn't ask you for confirmations for simple commands.

Migrating to a whole new IDE (which is much less popular than VS code) make no sense for me 🙃, by the way, enabling Windows experimental sandboxes didn't help to solve the issue

pythonaddict · 4 months ago
> Use Pycharm with AI Chat plugin. Unlike Visual Studio Code, Codex in PyCharm doesn't ask you for confirmations for simple commands. > Migrating to a whole new IDE (which is much less popular than VS code) make no sense for me 🙃, by the way, enabling Windows experimental sandboxes didn't help to solve the issue

Well you just need to install pycharm and copy your source code there. Pycharm is much more sophisticated and user friendly than Visual Studio Code. I tried both and Pycharm is just better in every aspect.