- Symptom
- Not inside a trusted directory and --skip-git-repo-check was not specified.Happens in Docker or CI workspaces without a .git folder, even with --yolo
- Cause
- Codex requires commands to run inside a Git repository as a guard against destructive changes, and the full-access flags do not lift that check.
- Fix
- Run inside a Git repository (git init works for scratch workspaces), or add --skip-git-repo-check in an environment you control.
- Apply
codex exec --skip-git-repo-check --sandbox workspace-write "task"- Affected
- Codex CLI codex exec, as of 2026-10
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders