Skip to content

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

Open

Description

@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"
  5. 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

  2. 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

Activity

  1. added
    appIssues related to the Codex desktop app
    on Jun 22, 2026
  2. added
    bugSomething isn't working
    sandboxIssues related to permissions or sandboxing
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on Jun 22, 2026
  3. github-actions commented on Jun 22, 2026

    @github-actions
    Contributor

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

    Powered by Codex Action

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appIssues related to the Codex desktop appbugSomething isn't workingsandboxIssues related to permissions or sandboxingsessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions