Allow writable `.git`/`gitdir`
What variant of Codex are you using?
CLI
What feature would you like to see?
This is related to #7071 , see also my comment there.
There are read-only exceptions to a writable root (WritableRoot.read_only_subpaths, see protocol.rs). Currently this is hard-coded with: .git (or gitdir equivalent), .codex and .agents.
It would be nice to make this configurable, especially adding a config to make .git/gitdir writable. Otherwise the agent cannot do any git operations without escalation. It's very annoying to keep approving those operations and make it harder for agents to work autonomously.
The rules system works sometime, but the current pattern matching capability does not deal with shell wrapper very well.
I understand the security concern, but it is less applicable to Codex CLI. In most cases, the project directory is a local git copy of a remote repo. The remote repo has its own security policy to guard against dangerous operations (e.g. protected main, no force push, etc.).
Making this configurable under workspace_write would be the best solution.
Additional information
_No response_
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗