Delegation task sandbox blocks Git writes and pushes despite writable repo path

Open 💬 0 comments Opened Jun 22, 2026 by muke1838-cloud

What happened?

In a Codex delegation task thread on macOS, Git operations in a designated writable repository fail because writes under .git are blocked.

Observed errors:

fatal: Unable to create '$HOME/Documents/Products/Lessons/.git/index.lock': Operation not permitted

A direct write probe fails the same way:

touch $HOME/Documents/Products/Lessons/.git/index.lock
# Operation not permitted

Using a /tmp clone can partially work around the local .git write restriction, but push actions still fail:

remote unpack failed: unable to create temporary object directory

when pushing to a local path remote pointing back at $HOME/Documents/Products/Lessons, and:

ssh: connect to host github.com port 22: Operation not permitted

when trying to push to GitHub over SSH.

This seems related to #7071, but the extra detail here is that it occurs inside a delegation task thread and blocks both normal .git writes and push-based workarounds.

Repro steps

  1. Start a Codex delegation task thread against a writable repo path such as $HOME/Documents/Products/Lessons.
  2. Run:
git status --short
git add docs/validation/2026-06-22-ea-1.0-acceptance-sop.md
  1. Observe the .git/index.lock write failure.
  2. Try to work around it by committing in a /tmp clone and pushing back to the original repo or to GitHub.
  3. Observe push failures caused by sandbox restrictions.

Expected behavior

If Codex is operating in a designated writable repository path, normal local Git workflows should work, including git add / git commit, or Codex should provide a narrow, safe way for task/delegation threads to write the repo's own .git metadata.

If remote push is intentionally blocked in this environment, the error should be surfaced as an explicit sandbox/network permission limitation rather than forcing the agent into repeated workarounds.

Impact

This blocks clean task completion in delegation workflows. The agent can edit files in the target repo, but cannot reliably stage, commit, or push the result, which requires manual workaround cloning to /tmp and still fails for push operations.

Environment

  • OS: macOS 26.3, build 25D125
  • Codex Desktop version: 26.616.51431
  • Codex Desktop bundle version: 4212
  • Codex CLI version: 0.142.0-alpha.6
  • Context: Codex delegation task thread

View original on GitHub ↗