You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
git branch -d runs without approval in Worktrees (Escapes workdir scope) #10160
What terminal emulator and version are you using (if applicable)?
wezterm
What issue are you seeing?
I encountered unexpected behavior where codex-cli executes git branch -d without requiring user confirmation, even though I am running in a Git Worktree + default rule.
I suspect this is a safety regression or a logic flaw in how the CLI handles Git Worktrees versus standard repositories.
What steps can reproduce the bug?
Create a git worktree: git worktree add ../my-feature-branch
Run codex-cli with the workdir set to this new worktree path.
Ask the CLI to delete a branch (e.g., git branch -d some-feature).
Observed: The command runs immediately without an approval prompt.
Note: I don't have any pre-approved command in my default.rule file
What is the expected behavior?
The CLI should pause and ask for confirmation (Decision: "deny" or "prompt"), especially since this is a destructive operation.
Activity
Fix unsafe auto-approval of git branch deletion
fix: unsafe auto-approval of git commands (#10258)
fix: unsafe auto-approval of git commands (openai#10258)
Merge upstream and adopt Kontext PKCE integration flow (#2)
fix: unsafe auto-approval of git commands (openai#10258)
fix: unsafe auto-approval of git commands (#10258)
fix: unsafe auto-approval of git commands (#10258)