Codex Session Cannot Write .git Despite Normal Permissions and Writable Workspace

Open 💬 1 comment Opened Jun 22, 2026 by jamesreimer

What version of the Codex App are you using (From “About Codex” dialog)?

26.616.51431

What subscription do you have?

ChatGPT Pro

What platform is your computer?

Darwin 25.5.0 arm64 arm

What issue are you seeing?

I encountered a Codex session issue that appears to be related to the sandbox or filesystem mount rather than the repository itself.

Environment:

  • Local Git repository
  • Codex was able to edit workspace files successfully

Observed behavior:

  • Codex reported:
  • ".git not writable"
  • ".git/index not writable"
  • As a result, Codex could not:
  • git add
  • git commit
  • git push
  • create pull requests

Diagnostics:

  • Repository was otherwise healthy.
  • Branch was intact.
  • No .git lock files existed.
  • Ownership and permissions appeared normal.

Results:

.git permissions:

  • drwxr-xr-x

.git/index permissions:

  • rw-r--r--

Lock files:

  • none found

Despite this, Codex diagnostics still reported:

  • .git not writable
  • .git/index not writable

Important detail:

  • Codex could edit project files successfully.
  • The issue appeared limited specifically to Git metadata writes.
  • Workspace files were writable.
  • Git metadata was not.

Resolution:

  • Restarting the app did not resolve the issue.
  • Creating a brand-new Codex thread/session immediately resolved the problem.
  • No repository changes were required.
  • The new session was able to interact with Git normally.

Reason for report:
The behavior suggests a conversation/session-specific sandbox or filesystem mount issue rather than:

  • repository corruption
  • Git corruption
  • branch problems
  • file ownership issues
  • lock files

The fact that a new Codex session immediately fixed the problem may help narrow down the root cause.

Hopefully this is useful for debugging.

What steps can reproduce the bug?

Unable to determine a reliable reproduction sequence.

Observed workflow:

  1. Open a Codex session connected to a local Git repository.
  2. Work normally for some period of time.
  3. Codex can edit workspace files successfully.
  4. Codex begins reporting:
  • ".git not writable"
  • ".git/index not writable"
  1. Git operations fail:
  • git add
  • git commit
  • git push
  • PR creation

Expected:
Codex can modify Git metadata and perform Git operations normally.

Actual:
Workspace files remain writable, but Git metadata becomes unavailable for writes.

Workaround:
Create a brand-new Codex thread/session.

Result:
The new session immediately regains Git functionality without any repository changes.

What is the expected behavior?

When Codex has write access to the workspace and is connected to a valid Git repository, it should also be able to perform normal Git operations that require writing Git metadata, including:

  • git add
  • git commit
  • git push
  • pull request creation

Codex should either:

  1. Successfully perform Git operations, or
  1. Provide a clear and accurate explanation if Git operations are intentionally unavailable.

A session should not enter a state where:

  • workspace files remain writable
  • repository permissions and ownership appear normal
  • no Git lock files exist
  • Git metadata is reported as non-writable

Creating a new Codex session should not be required to restore normal Git functionality.

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗