`git branch -d` blocked by policy despite sandbox_mode=danger-full-access (CLI 0.97.0/0.98.0)
Resolved 💬 1 comment Opened Feb 7, 2026 by wphillipmoore Closed Feb 14, 2026
Environment
- Codex CLI: 0.98.0 (initial), downgraded to 0.97.0 (still broken)
- Model: gpt-5.2-codex (reasoning high)
- approval_policy: never
- sandbox_mode: danger-full-access
- network_access: enabled
- OS: macOS (Intel)
- Repo: any (observed in ~/dev/github/pymqrest)
- Config: ~/.codex/config.toml has only sandbox_mode=danger-full-access (no command allow/deny config)
Repro steps
1) Start Codex CLI session with approval_policy=never and sandbox_mode=danger-full-access
2) In a git repo, create a local branch:
git checkout -b tmp-codex-policy-test
3) Return to main branch:
git checkout develop
4) Try to delete the branch:
git branch -d tmp-codex-policy-test
Actual result
- Command rejected: “blocked by policy” from the execution harness
Expected result
- Command should execute normally (no sandbox restrictions)
Additional evidence
- Downgraded to codex-cli 0.97.0; same rejection.
- Local config (~/.codex/config.toml) has no allow/deny list.
- Filesystem access is unrestricted, but command is blocked.
Impact
- Breaks normal git workflow (cleanup of feature branches) despite “danger-full-access”.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗