You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows approval “Allow for this session” isn’t remembered #4212
Trigger any non–auto-approved command, e.g. a git init.
In the approval modal choose “Always” / “Approve for this session.”
Let the tool run, then issue the same command again.
Codex asks for approval every time.
What is the expected behavior?
Once I approve “for this session,” any equivalent invocation during that session should run without another prompt.
What do you see instead?
Codex repeats the approval prompt because the stored command vector only matches the PowerShell-wrapped version that actually ran, not the original bash -lc … the UI shows and the model reuses.
Additional information
Bug reproduces reliably on Windows because exec command translation swaps the command vector before caching. Broad fix is to store both the displayed command and the executed command when the user approves “for this session.”
Reacted by Thomas G, Jacques Bosch, fatih akyon, James Gillard, MrGeRoI, Nick Youngblut, Lyle Shearer, Andrew Kidd, Enrico, Phil Reinhold and 12 more
Reacted by Alexander Smirnov, Great River Bear, Sam Gu, Daniele Zanaga, fatih akyon and mobtex
It is not normal that we have either to click on "allow this sessions" several times per prompt and grant access to the current project or to grant full access to our file system.
this is not an acceptable choice !
click on "Allow this session" should grant access to the current project only !
Chatgpt helped me install wls and run vs code from there. Had to put my project there which is not ideal but at least I can give a task and leave and it will be done when I come back 👍
Funny enough, i have the exact same issue on Fedora, Linux, via Codex CLI.
It looks like Codex fails to edit a file properly, and it asks for permission, but when you select Yes, and don't ask again for these files, it keeps asking for this file. Kinda annoying.
Just a note for others, on my Windows machine with extension openai.chatgpt:0.4.60, I'm finding that if I edit C:\Users\user\.codex\config.toml and manually add
Then it massively reduces the number of permission requests. However it still sometimes asks me for permission to write to files?? In these cases you can see in the console output the following:
[error] [CodexMcpConnection] CLI: codex_core::codex: needs_follow_up: true
[info] Received app server notification: codex/event/token_count
[info] Received app server notification: thread/tokenUsage/updated
[info] Received app server notification: account/rateLimits/updated
[info] Received app server notification: codex/event/patch_apply_begin
[info] Received app server notification: item/started
[info] Received app server notification: codex/event/apply_patch_approval_request
[info] Received server request: 1 item/fileChange/requestApproval object(keys=5)
So one idea is that it's the backend that's driving the permission checks which also implies it could be per-model based, I'm on 5.2.
I took another pass through this thread and the current reports. This issue may benefit from an explicit status split, because the comments now seem to cover more than the original Windows command-vector mismatch.
The original report points to a concrete class of bug: the user approves the displayed command “for this session”, but the cached approval matches the translated/wrapped command that actually ran. On native Windows, where commands may be rewritten through PowerShell/cmd wrappers, that can make the next equivalent request miss the session approval.
A focused regression test could cover:
User-facing command is bash -lc ... or equivalent displayed text.
Execution command is translated/wrapped for native Windows.
User selects AcceptForSession.
A later equivalent model request matches the prior approval whether it is compared against the displayed command, the executed command, or the normalized command identity.
It would also help to separate the remaining reports by environment:
native Windows without experimental sandbox;
Windows + WSL remote workspace;
VS Code remote SSH into Linux;
macOS/Linux reports that may actually be file-change approval rather than command approval;
item/fileChange/requestApproval / apply_patch_approval_request cases, which may be a separate path from command execution approvals.
That split could make it clearer whether this issue should stay focused on command approval caching, or whether a second issue is needed for file-change approval repetition.
Per docs/contributing.md, I’m sharing analysis rather than opening an unsolicited PR. If maintainers want a repro artifact, the command-normalization regression test above seems like the smallest useful starting point.
On native Windows, "Allow for this session" often fails because the UI stores the translated PowerShell command vector, then the next turn sends the original bash -lc ... form and the match misses.
Method:
Trust the project in ~/.codex/config.toml so repeated local commands stop hitting the prompt:
Activity
beestinger72 commentedon Sep 26, 2025
pain in the neck for a first time user
densy07 commentedon Sep 26, 2025
i have to use WSL
panthernet commentedon Sep 27, 2025
I have to use FullAccess for now and I'm scared
Weijiang-Xiong commentedon Sep 27, 2025
I have the same problem with MacOS and Win10, I'm sshing to a Linux computer.
kuravista commentedon Sep 29, 2025
i have same problem to..always clikc "aprove this session" every time. when forget use fullaccess
tariqkhan051 commentedon Sep 30, 2025
same issue, even after clicking 'approve this session', it's asking again and again
stavBodik commentedon Sep 30, 2025
Same here, Wating for fix, thanks developers !
TVpoet commentedon Oct 1, 2025
same, please fix it
jfbosch commentedon Oct 2, 2025
Same on win 11.
YanX94 commentedon Oct 7, 2025
Same Win11
joserachetti commentedon Oct 8, 2025
Same problem on Win 10
MrGeRoI commentedon Oct 10, 2025
I'm using full acess but i'm afraid it will mess up everything somehow
Abdelkrim commentedon Oct 14, 2025
It is not normal that we have either to click on "allow this sessions" several times per prompt and grant access to the current project or to grant full access to our file system.
this is not an acceptable choice !
click on "Allow this session" should grant access to the current project only !
19 remaining items
Maxed-Out-99 commentedon Dec 22, 2025
Chatgpt helped me install wls and run vs code from there. Had to put my project there which is not ideal but at least I can give a task and leave and it will be done when I come back 👍
evenfrost commentedon Dec 30, 2025
This is still an issue with Cursor + Codex extension.
moritonal commentedon Jan 7, 2026
Still happening for new Windows user. For large changes it makes the extension very annoying to work with
christopherjnash commentedon Jan 7, 2026
Also still having the same problem unfortunately... Anybody have a workaround that doesn't include WSL use?
baochenw commentedon Jan 9, 2026
Also still having the same problem on VS Code extension 0.4.58
felipekjr commentedon Jan 9, 2026
Still happening on Ubuntu 20.04 and VS Code
Jason5Lee commentedon Jan 14, 2026
Still happening on Windows. While working fine on macOS.
etraut-openai commentedon Jan 14, 2026
@Jason5Lee, have you tried enabling the Windows experimental sandbox?
Olyno commentedon Jan 15, 2026
Funny enough, i have the exact same issue on Fedora, Linux, via Codex CLI.
It looks like Codex fails to edit a file properly, and it asks for permission, but when you select
Yes, and don't ask again for these files, it keeps asking for this file. Kinda annoying.moritonal commentedon Jan 16, 2026
Just a note for others, on my Windows machine with extension
openai.chatgpt:0.4.60, I'm finding that if I editC:\Users\user\.codex\config.tomland manually addThen it massively reduces the number of permission requests. However it still sometimes asks me for permission to write to files?? In these cases you can see in the console output the following:
So one idea is that it's the backend that's driving the permission checks which also implies it could be per-model based, I'm on 5.2.
WAY29 commentedon Jan 17, 2026
same in WSL and vscode plugin
SylvainWinning commentedon May 25, 2026
I took another pass through this thread and the current reports. This issue may benefit from an explicit status split, because the comments now seem to cover more than the original Windows command-vector mismatch.
The original report points to a concrete class of bug: the user approves the displayed command “for this session”, but the cached approval matches the translated/wrapped command that actually ran. On native Windows, where commands may be rewritten through PowerShell/cmd wrappers, that can make the next equivalent request miss the session approval.
A focused regression test could cover:
bash -lc ...or equivalent displayed text.AcceptForSession.It would also help to separate the remaining reports by environment:
item/fileChange/requestApproval/apply_patch_approval_requestcases, which may be a separate path from command execution approvals.That split could make it clearer whether this issue should stay focused on command approval caching, or whether a second issue is needed for file-change approval repetition.
Per
docs/contributing.md, I’m sharing analysis rather than opening an unsolicited PR. If maintainers want a repro artifact, the command-normalization regression test above seems like the smallest useful starting point.naipi11 commentedon Aug 18, 2026
On native Windows, "Allow for this session" often fails because the UI stores the translated PowerShell command vector, then the next turn sends the original
bash -lc ...form and the match misses.Method:
~/.codex/config.tomlso repeated local commands stop hitting the prompt:[notice] hide_full_access_warning = true.approval_policy = "never"or run that workspace under WSL, where session approvals do persist.This reduces the prompt storm; it does not make the Windows session-approval matcher remember the pre-translation command.
Independent community workaround; not an official OpenAI fix.