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
What terminal emulator and version are you using (if applicable)?
Windows Terminal to connect to Linux host
Codex doctor report
What issue are you seeing?
When running Codex in a Git worktree, the Linux sandbox remounts the resolved worktree gitdir read-only even when the Codex permission profile explicitly grants write access to the repository .git directory.
This prevents normal Git operations such as git add and git commit.
fatal: Unable to create /home/lcerman/foo/.git/worktrees/lc_dev/index.lock: Read-only file system
findmnt -R /home/lcerman/foo/.git executed from sandboxed codex session shows:
/home/lcerman/foo/.git rw
/home/lcerman/foo/.git/worktrees/lc_dev ro
`
### What is the expected behavior?
If an explicit write permission is granted for /home/lcerman/reqview_ai/.git, Codex should allow writes to the resolved worktree gitdir below it (including subdirectories), or provide a documented way to permit Git metadata writes for
staging/committing.
### Notes
This appears related to the protected metadata policy in:
- `codex-rs/linux-sandbox/src/bwrap.rs`
- `codex-rs/protocol/src/permissions.rs`
The source appears to detect .git pointer files, resolve gitdir: ..., and **add the resolved gitdir as a protected read-only subpath**. That is reasonable as a default, but it seems to override explicit user write permission for .git.
This basically prevents codex from being able to use git (it cannot commit the work done).
The explicit `"/home/lcerman/foo/.git" = "write"` shall prevent the read-only protection enforced on .git dirs.
### Additional information
_No response_
Activity
github-actions commentedon Jun 10, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
lcerman commentedon Jun 10, 2026
Btw. even when I tried to set
:root = writethe git is still not usable.bwrap: Can't mkdir /.git: Permission deniedRemove the --add-dir git dir: it cannot make a worktree's git metadat…