fatal: Unable to create '.git/index.lock': Permission denied, has full permissions

Open 💬 4 comments Opened Apr 23, 2026 by doublemover
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

0.124.0

What subscription do you have?

Pro

Which model were you using?

gpt-5.5 high

What platform is your computer?

win11 x64

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

ps7.x

What issue are you seeing?

Codex is completely unable to use gh or git.

With default permissions, commands that do not require permissions to run do not work. Commands that ask for permissions work.

With full permissions, virtually nothing at all works. After going to great lengths to re-feed it my gh auth token, it's still unable to use git, running in circles about ACLs and sandbox permissions and writing increasingly convoluted scripts to try and simply check files in.

<img width="816" height="486" alt="Image" src="https://github.com/user-attachments/assets/495e5e7e-8286-4b84-90fd-7f129134cc43" />

What steps can reproduce the bug?

Use codex

What is the expected behavior?

It can use git

Additional information

_"Victory comes from finding opportunities in problems." - Sun Tzu_

View original on GitHub ↗

4 Comments

github-actions[bot] contributor · 4 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #18918
  • #19189
  • #18620

Powered by Codex Action

doublemover · 4 months ago

Confirming that --yolo works whereas promotion via /permissions does not

joshka · 4 months ago

@bolinfest I'm curious about whether this was an intentional result of security hardening or an incidental casualty here - it's hard to tell on this one. It also breaks jj desc which was working fine in 0.122. Can confirm works fine in --yolo

RoboLagoon · 2 months ago

It's crazy this bug in codex sandbox is not fixed yet for months @codex fix it!