Codex can commit in a plain checkout: the driver makes the git dir writable - #1780
Merged
Merged
Conversation
…itable under workspace-write (#1747) Codex's workspace-write sandbox keeps a root .git/ directory read-only, so a Codex agent in a plain clone failed its first commit on .git/index.lock. Each turn now resolves the git common dir and passes it as a writable root. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex's
workspace-writesandbox keeps a.git/directory at the workspace root read-only. So a Codex agent in a plain clone failed its first commit on.git/index.lock. Agent checkouts under.branches/are git worktrees, so they never hit it.CodexSession.prompt()looks up the git common dir on every turn withgit rev-parse --path-format=absolute --git-common-dir.workspace-write, the driver passes that dir as-c sandbox_workspace_write.writable_roots=[...].read-onlyanddanger-full-accessare unchanged.extraArgsstill come last, so a caller's ownwritable_rootsreplaces ours. The option's doc comment now says so.git inittemp repo and the read-only sandbox. With the flag switched off, the repo test fails.codex.LOGIC.mdandcodex.test.LOGIC.mdare updated.Closes #1747
🤖 Generated with Claude Code
Opened from The Framework session
codex-git-dir-writable.