OpenAI Codex · tool · fg-0505

git commit fails inside Codex's workspace-write sandbox because .git is read-only

git commit, git checkout, or git stash fail with a permission error inside Codex

Verified 2026-10-15 · Confirmed by 0 builders · Trust 50/100

Cause

workspace-write keeps .git, a worktree's resolved gitdir, .agents, .codex, and .aws read-only even inside writable roots. Linux was brought in line with macOS, so git metadata writes that once worked there are now blocked.

Fix

Let Codex edit files and run git yourself, approve an escalation for the git command, or use danger-full-access only in an isolated environment.

Apply

codex --sandbox workspace-write --ask-for-approval on-request   # approve the escalated git command when asked

Affects: Codex CLI workspace-write sandbox on macOS and Linux, as of 2026-10

Sources

Have your agent know this before it fails

claude mcp add --transport http footgun https://getfootgun.com/api/mcp