What version of the Codex App are you using (From “About Codex” dialog)?
26.707.8479.0
What subscription do you have?
Pro
What platform is your computer?
Windows 11
What issue are you seeing?
Summary
Codex Desktop on Windows stopped being able to perform autonomous Git metadata writes after the application updated from 26.707.3748.0 to 26.707.6957.0.
Before this update, I used Codex Desktop for multiple pull requests over several days, including autonomous staging, commits, pushes, CI fixes, and PR lifecycle work.
After the update, a newly created linked worktree allowed Codex to edit, build, and test ordinary files, but every operation requiring writes to Git metadata failed because the Windows sandbox could not create lock files under the resolved worktree Git directory.
The same Git commands succeeded immediately in ordinary, non-administrator PowerShell.
This report expands on the symptoms already discussed in:
The new evidence here is the exact local Codex Desktop package-update timeline, which strongly correlates the regression with the 26.707.3748.0 → 26.707.6957.0 transition.
Environment
- Platform: Windows 11 x64
- Codex Desktop, native Windows execution
- Current affected Desktop package:
26.707.8479.0
- First apparently affected package:
26.707.6957.0
- Last package under which previous PR workflows worked:
26.707.3748.0
- Model:
gpt-5.6-sol, although this is not model-specific
- Sandbox mode:
workspace-write
- Windows sandbox:
[windows] sandbox = "elevated"
- Repository location: dedicated development directory outside
USERPROFILE and outside OneDrive
- Repository type: normal Git repository using linked worktrees
- GitHub authentication: healthy and unrelated to the local failure
- Ordinary PowerShell: non-administrator and able to perform the same Git operations successfully
A later project-specific permission profile explicitly granted write access to the repository and .git, but Windows ACL denial still took precedence.
Confirmed application-update timeline
Windows Microsoft-Windows-AppXDeploymentServer/Operational events recorded these package transitions:
| Local time |
Package transition |
| 2026-07-12 21:57 |
26.707.3748.0 → 26.707.6957.0 |
| 2026-07-13 01:30 |
A fresh linked worktree for the affected PR was created |
| 2026-07-13 06:38 |
26.707.6957.0 → 26.707.8168.0 |
| 2026-07-13 17:29 |
26.707.8168.0 → 26.707.8479.0 |
The first affected linked worktree was therefore created approximately three and a half hours after the update to 26.707.6957.0.
Earlier PRs completed successfully after the relevant upstream source changes had been merged, but before these Desktop packages reached this machine. This suggests the source merge date and Desktop rollout date should not be treated as the same event.
I cannot confirm which exact public source commit is bundled in each Desktop package because there does not appear to be a public Desktop-build-to-source-commit mapping. The package transition is therefore strong correlation, not a claim of proven source-level causation.
Repository and worktree structure
The repository is outside the user profile:
The linked worktree is beneath the repository:
C:\Dev\[repository]\.worktrees\[worktree]
The worktree’s visible .git file resolves to:
C:\Dev\[repository]\.git\worktrees\[worktree]
That resolved directory contains the worktree index and is where Git must create index.lock.
Observed behavior
Codex can successfully:
- Inspect and modify ordinary source files
- Run formatters
- Restore dependencies
- Build the solution
- Run unit and integration tests
- Inspect Git state
- Access GitHub
- Push an already-created commit to the remote repository
Codex cannot successfully:
- Stage changes
- Create commits
- Refresh the Git index
- Update local refs
- Update local remote-tracking refs after a push
- Create lock files beneath the resolved worktree Git directory
The primary error is:
fatal: Unable to create 'C:/Dev/[repository]/.git/worktrees/[worktree]/index.lock': Permission denied
There is no stale index.lock.
Both an ordinary and an approval/elevation-assisted git add attempt from the Codex backend failed on the same path.
The identical staging and commit commands succeed immediately when run from regular, non-administrator PowerShell.
Effective identity split
The autonomous Codex backend runs under a dedicated Windows sandbox identity such as:
[machine]\CodexSandboxOnline
Ordinary PowerShell runs as the normal Windows user.
The normal user owns or controls the repository metadata and can create index.lock. The sandbox identity cannot.
ACL inspection shows explicit DENY entries affecting sandbox-created identities on the repository .git hierarchy or the resolved linked-worktree Git directory. Actual usernames, machine names, and SIDs are intentionally omitted.
The effective behavior is:
Ordinary PowerShell → normal Windows user → Git metadata write succeeds
Codex backend → sandbox identity → Git metadata write is denied
A project permission profile may declare .git writable, but an explicit Windows DENY ACE still wins.
Reproduction steps
-
Use Codex Desktop natively on Windows 11.
-
Configure:
sandbox_mode = "workspace-write"
[windows]
sandbox = "elevated"
-
Open a trusted Git repository outside USERPROFILE.
-
Create or use a linked Git worktree.
-
Confirm that its .git pointer resolves to:
[main repository]\.git\worktrees\[worktree]
-
Ask Codex to modify a tracked file.
-
From the autonomous Codex backend, run:
-
Observe:
fatal: Unable to create '.../.git/worktrees/[worktree]/index.lock': Permission denied
-
Confirm that no stale lock exists.
-
Run the identical git add and git commit commands from ordinary, non-administrator PowerShell.
-
Observe that they succeed.
-
Inspect the Git metadata ACLs and observe explicit deny entries associated with sandbox identities.
-
Restarting Codex or continuing in later turns does not make the affected linked worktree writable.
Remote push half-success
Once a commit is created outside Codex, the Codex backend can push it successfully to GitHub. However, Git can then fail when updating the local remote-tracking ref because it cannot create the corresponding lock file beneath .git.
Observed result:
- Remote branch advances successfully
- Local
origin/[branch] tracking ref remains stale
- Git reports a local ref-lock failure
- The task may incorrectly treat the push as failed or retry it
This is the same hazardous split-state behavior documented in issue #21869.
Impact
This breaks autonomous local PR workflows.
The repeated sequence becomes:
- Codex implements and validates a change.
- Codex cannot stage or commit it.
- The task stops and asks the user to run a PowerShell command.
- The user creates the commit manually.
- Codex detects and pushes the commit.
- CI or review discovers another necessary change.
- The same manual checkpoint is required again.
A single PR required repeated user-operated staging and commit commands because each CI or review fix encountered the same unchanged Git ACL boundary.
The manual commit does not repair the ACL, so the failure repeats for every subsequent change.
This also makes long autonomous tasks misleading: editing and validation appear fully functional until the first checkpoint requiring a Git metadata write.
Relevant upstream implementation history
Several merged changes appear directly relevant.
Elevated Windows sandbox deliberately protects .git
PR #17365 — Include legacy deny paths in elevated Windows sandbox setup states that elevated setup and refresh include existing .git, .codex, and .agents directories in the deny-write set.
Its validation explicitly confirms the intended result:
- Attempting to modify
.git/config produces Access is denied
- A
DENY ACE is present on .git
- The same protection applies to elevated and unelevated Windows sandboxes
This establishes that denying .git writes is deliberate in the underlying sandbox implementation.
Persistent ACL reconciliation
PR #22569 — Simplify legacy Windows sandbox ACL persistence states that workspace-write already uses persistent ACL behavior and moves legacy handling toward persistent reconciliation rather than post-command cleanup.
This appears relevant to deny entries surviving across commands and sessions.
July ACL refresh behavior
PR #31138 — Allow deletion in writable roots, merged on July 8, changes Windows writable-root ACL handling and refreshes stale write ACEs.
It explicitly preserves .git as a protected child and adds regression coverage ensuring it remains protected.
This PR did not originally introduce .git protection, but it may be relevant to a newer Desktop build beginning to refresh or enforce previously stale ACL state consistently.
The exact mapping between this source change and Desktop package 26.707.6957.0 is not publicly confirmed.
Existing issue relationship
This likely shares an underlying policy or implementation boundary with:
This report is narrower than #32872 because the affected workspace is a real Git repository.
It adds information not present in the original #18918 report:
- Exact Codex Desktop package transitions
- A previously functional autonomous workflow immediately preceding the transition
- A repository outside
USERPROFILE
- A linked worktree whose resolved Git directory is beneath
.git/worktrees
- Explicit project permission granting
.git write access
- Repeated manual checkpoint impact across one PR
- The remote-push/local-tracking-ref split state
Expected behavior
A trusted, explicitly writable repository should have a supported way to perform normal Git operations without disabling the entire sandbox.
Acceptable designs could include any of the following:
-
Allow Git metadata writes for the current trusted repository when explicitly authorized.
-
Honor a project permission profile that explicitly grants write access to the repository .git directory.
-
Correctly resolve linked-worktree .git pointer files and permit the required path under:
[repository]\.git\worktrees\[worktree]
-
Broker a narrow set of Git metadata operations outside the file sandbox after normal approval, without giving arbitrary commands unrestricted filesystem access.
-
Detect Git commands requiring protected metadata and request an appropriate escalation before executing them.
-
Prevent git push from performing a remote side effect when the required local tracking-ref update cannot succeed.
-
At minimum, document clearly that workspace-write cannot stage, commit, fetch, or update refs, rather than allowing an autonomous PR workflow to fail only at checkpoint time.
Security boundary
I am not requesting unrestricted access to every .git directory on the machine.
The requested behavior is a narrowly scoped and auditable Git-write mechanism for:
- The currently trusted repository
- The active linked worktree
- Explicitly approved Git operations
- Explicitly configured project permission profiles
The currently suggested workaround, sandbox_mode = "danger-full-access", removes the sandbox’s filesystem and network boundaries. That is a disproportionate requirement merely to allow staging and committing inside one trusted repository.
OpenAI’s configuration guidance describes danger-full-access as running without sandbox restrictions and recommends caution:
Requested investigation
Please confirm:
-
Which Codex Desktop package first included the current .git ACL reconciliation behavior.
-
Whether 26.707.6957.0 introduced or activated a change affecting elevated Windows workspace-write Git operations.
-
Whether a Desktop package update can refresh persistent ACLs for a repository or linked worktree that was already open.
-
Whether linked-worktree Git directories are intentionally denied even when their parent .git path is explicitly configured as writable.
-
Whether the intended product position is that workspace-write cannot perform autonomous staging, commits, fetches, or local ref updates.
-
Whether a supported narrow Git-operation broker or repository-scoped exception is planned.
Privacy and evidence handling
The following have intentionally been redacted:
- Windows username
- Machine name
- Sandbox SIDs
- Repository name
- Repository remote
- Branch name
- Commit hashes
- Private source paths beyond generic directory structure
No credentials, tokens, secrets, private keys, production data, or private repository contents are included.
I can provide additional sanitized AppX deployment events and ACL output if maintainers request them.
What steps can reproduce the bug?
-
Run Codex Desktop natively on Windows 11.
-
Configure Codex with:
sandbox_mode = "workspace-write"
[windows] sandbox = "elevated"
-
Open a trusted Git repository outside USERPROFILE.
-
Create or use a linked Git worktree whose .git file resolves to:
C:\Dev\[repository]\.git\worktrees\[worktree]
-
Ask the autonomous Codex backend to modify a tracked file.
-
From the Codex task, run:
git add [changed-file]
-
Git fails with:
fatal: Unable to create '.../.git/worktrees/[worktree]/index.lock': Permission denied
-
Confirm that no stale index.lock exists.
-
Run the identical git add and git commit commands in ordinary, non-administrator PowerShell.
-
Observe that both commands succeed immediately.
-
Inspect the Git metadata ACLs and observe explicit DENY entries affecting Codex sandbox identities.
The failure repeats for every later CI or review fix because manually creating one commit does not repair the Git-directory ACL.
A push can also update the remote branch successfully and then fail to update the local remote-tracking ref because Codex cannot create its lock file beneath .git.
What is the expected behavior?
A trusted repository should have a supported, narrowly scoped way to perform normal Git operations without requiring danger-full-access.
When the repository or its .git directory is explicitly configured as writable, Codex should either:
- Permit the Git metadata writes required for staging, commits, fetches, and local ref updates; or
- Detect the protected Git operation and request a narrowly scoped escalation before executing it.
For linked worktrees, Codex must resolve the worktree’s .git pointer and handle the actual Git directory beneath:
[repository]\.git\worktrees\[worktree]
Codex should not allow a push to modify the remote branch and then leave the local tracking ref stale because the corresponding local lock file is denied.
Sandbox ACL entries should not persist or accumulate in a way that forces the user to perform every Git checkpoint manually.
The user should not need to disable all filesystem and network sandbox boundaries merely to stage and commit changes inside one explicitly trusted repository.
Additional information
No response
What version of the Codex App are you using (From “About Codex” dialog)?
26.707.8479.0
What subscription do you have?
Pro
What platform is your computer?
Windows 11
What issue are you seeing?
Summary
Codex Desktop on Windows stopped being able to perform autonomous Git metadata writes after the application updated from
26.707.3748.0to26.707.6957.0.Before this update, I used Codex Desktop for multiple pull requests over several days, including autonomous staging, commits, pushes, CI fixes, and PR lifecycle work.
After the update, a newly created linked worktree allowed Codex to edit, build, and test ordinary files, but every operation requiring writes to Git metadata failed because the Windows sandbox could not create lock files under the resolved worktree Git directory.
The same Git commands succeeded immediately in ordinary, non-administrator PowerShell.
This report expands on the symptoms already discussed in:
.gitdirectoriesThe new evidence here is the exact local Codex Desktop package-update timeline, which strongly correlates the regression with the
26.707.3748.0→26.707.6957.0transition.Environment
26.707.8479.026.707.6957.026.707.3748.0gpt-5.6-sol, although this is not model-specificworkspace-write[windows] sandbox = "elevated"USERPROFILEand outside OneDriveA later project-specific permission profile explicitly granted write access to the repository and
.git, but Windows ACL denial still took precedence.Confirmed application-update timeline
Windows
Microsoft-Windows-AppXDeploymentServer/Operationalevents recorded these package transitions:26.707.3748.0→26.707.6957.026.707.6957.0→26.707.8168.026.707.8168.0→26.707.8479.0The first affected linked worktree was therefore created approximately three and a half hours after the update to
26.707.6957.0.Earlier PRs completed successfully after the relevant upstream source changes had been merged, but before these Desktop packages reached this machine. This suggests the source merge date and Desktop rollout date should not be treated as the same event.
I cannot confirm which exact public source commit is bundled in each Desktop package because there does not appear to be a public Desktop-build-to-source-commit mapping. The package transition is therefore strong correlation, not a claim of proven source-level causation.
Repository and worktree structure
The repository is outside the user profile:
The linked worktree is beneath the repository:
The worktree’s visible
.gitfile resolves to:That resolved directory contains the worktree index and is where Git must create
index.lock.Observed behavior
Codex can successfully:
Codex cannot successfully:
The primary error is:
There is no stale
index.lock.Both an ordinary and an approval/elevation-assisted
git addattempt from the Codex backend failed on the same path.The identical staging and commit commands succeed immediately when run from regular, non-administrator PowerShell.
Effective identity split
The autonomous Codex backend runs under a dedicated Windows sandbox identity such as:
Ordinary PowerShell runs as the normal Windows user.
The normal user owns or controls the repository metadata and can create
index.lock. The sandbox identity cannot.ACL inspection shows explicit
DENYentries affecting sandbox-created identities on the repository.githierarchy or the resolved linked-worktree Git directory. Actual usernames, machine names, and SIDs are intentionally omitted.The effective behavior is:
A project permission profile may declare
.gitwritable, but an explicit WindowsDENYACE still wins.Reproduction steps
Use Codex Desktop natively on Windows 11.
Configure:
Open a trusted Git repository outside
USERPROFILE.Create or use a linked Git worktree.
Confirm that its
.gitpointer resolves to:Ask Codex to modify a tracked file.
From the autonomous Codex backend, run:
Observe:
Confirm that no stale lock exists.
Run the identical
git addandgit commitcommands from ordinary, non-administrator PowerShell.Observe that they succeed.
Inspect the Git metadata ACLs and observe explicit deny entries associated with sandbox identities.
Restarting Codex or continuing in later turns does not make the affected linked worktree writable.
Remote push half-success
Once a commit is created outside Codex, the Codex backend can push it successfully to GitHub. However, Git can then fail when updating the local remote-tracking ref because it cannot create the corresponding lock file beneath
.git.Observed result:
origin/[branch]tracking ref remains staleThis is the same hazardous split-state behavior documented in issue #21869.
Impact
This breaks autonomous local PR workflows.
The repeated sequence becomes:
A single PR required repeated user-operated staging and commit commands because each CI or review fix encountered the same unchanged Git ACL boundary.
The manual commit does not repair the ACL, so the failure repeats for every subsequent change.
This also makes long autonomous tasks misleading: editing and validation appear fully functional until the first checkpoint requiring a Git metadata write.
Relevant upstream implementation history
Several merged changes appear directly relevant.
Elevated Windows sandbox deliberately protects
.gitPR #17365 — Include legacy deny paths in elevated Windows sandbox setup states that elevated setup and refresh include existing
.git,.codex, and.agentsdirectories in the deny-write set.Its validation explicitly confirms the intended result:
.git/configproducesAccess is deniedDENYACE is present on.gitThis establishes that denying
.gitwrites is deliberate in the underlying sandbox implementation.Persistent ACL reconciliation
PR #22569 — Simplify legacy Windows sandbox ACL persistence states that
workspace-writealready uses persistent ACL behavior and moves legacy handling toward persistent reconciliation rather than post-command cleanup.This appears relevant to deny entries surviving across commands and sessions.
July ACL refresh behavior
PR #31138 — Allow deletion in writable roots, merged on July 8, changes Windows writable-root ACL handling and refreshes stale write ACEs.
It explicitly preserves
.gitas a protected child and adds regression coverage ensuring it remains protected.This PR did not originally introduce
.gitprotection, but it may be relevant to a newer Desktop build beginning to refresh or enforce previously stale ACL state consistently.The exact mapping between this source change and Desktop package
26.707.6957.0is not publicly confirmed.Existing issue relationship
This likely shares an underlying policy or implementation boundary with:
workspace-writedoes not allow writes to.gitdanger-full-accessworkaround.gitwrite permission.gitin a non-Git workspaceThis report is narrower than #32872 because the affected workspace is a real Git repository.
It adds information not present in the original #18918 report:
USERPROFILE.git/worktrees.gitwrite accessExpected behavior
A trusted, explicitly writable repository should have a supported way to perform normal Git operations without disabling the entire sandbox.
Acceptable designs could include any of the following:
Allow Git metadata writes for the current trusted repository when explicitly authorized.
Honor a project permission profile that explicitly grants write access to the repository
.gitdirectory.Correctly resolve linked-worktree
.gitpointer files and permit the required path under:Broker a narrow set of Git metadata operations outside the file sandbox after normal approval, without giving arbitrary commands unrestricted filesystem access.
Detect Git commands requiring protected metadata and request an appropriate escalation before executing them.
Prevent
git pushfrom performing a remote side effect when the required local tracking-ref update cannot succeed.At minimum, document clearly that
workspace-writecannot stage, commit, fetch, or update refs, rather than allowing an autonomous PR workflow to fail only at checkpoint time.Security boundary
I am not requesting unrestricted access to every
.gitdirectory on the machine.The requested behavior is a narrowly scoped and auditable Git-write mechanism for:
The currently suggested workaround,
sandbox_mode = "danger-full-access", removes the sandbox’s filesystem and network boundaries. That is a disproportionate requirement merely to allow staging and committing inside one trusted repository.OpenAI’s configuration guidance describes
danger-full-accessas running without sandbox restrictions and recommends caution:Requested investigation
Please confirm:
Which Codex Desktop package first included the current
.gitACL reconciliation behavior.Whether
26.707.6957.0introduced or activated a change affecting elevated Windowsworkspace-writeGit operations.Whether a Desktop package update can refresh persistent ACLs for a repository or linked worktree that was already open.
Whether linked-worktree Git directories are intentionally denied even when their parent
.gitpath is explicitly configured as writable.Whether the intended product position is that
workspace-writecannot perform autonomous staging, commits, fetches, or local ref updates.Whether a supported narrow Git-operation broker or repository-scoped exception is planned.
Privacy and evidence handling
The following have intentionally been redacted:
No credentials, tokens, secrets, private keys, production data, or private repository contents are included.
I can provide additional sanitized AppX deployment events and ACL output if maintainers request them.
What steps can reproduce the bug?
Run Codex Desktop natively on Windows 11.
Configure Codex with:
sandbox_mode = "workspace-write"[windows] sandbox = "elevated"Open a trusted Git repository outside
USERPROFILE.Create or use a linked Git worktree whose
.gitfile resolves to:C:\Dev\[repository]\.git\worktrees\[worktree]Ask the autonomous Codex backend to modify a tracked file.
From the Codex task, run:
git add [changed-file]Git fails with:
fatal: Unable to create '.../.git/worktrees/[worktree]/index.lock': Permission deniedConfirm that no stale
index.lockexists.Run the identical
git addandgit commitcommands in ordinary, non-administrator PowerShell.Observe that both commands succeed immediately.
Inspect the Git metadata ACLs and observe explicit
DENYentries affecting Codex sandbox identities.The failure repeats for every later CI or review fix because manually creating one commit does not repair the Git-directory ACL.
A push can also update the remote branch successfully and then fail to update the local remote-tracking ref because Codex cannot create its lock file beneath
.git.What is the expected behavior?
A trusted repository should have a supported, narrowly scoped way to perform normal Git operations without requiring
danger-full-access.When the repository or its
.gitdirectory is explicitly configured as writable, Codex should either:For linked worktrees, Codex must resolve the worktree’s
.gitpointer and handle the actual Git directory beneath:[repository]\.git\worktrees\[worktree]Codex should not allow a push to modify the remote branch and then leave the local tracking ref stale because the corresponding local lock file is denied.
Sandbox ACL entries should not persist or accumulate in a way that forces the user to perform every Git checkpoint manually.
The user should not need to disable all filesystem and network sandbox boundaries merely to stage and commit changes inside one explicitly trusted repository.
Additional information
No response