Add a codex shell function to ~/.zshrc (or ~/.bashrc) that:
- Always runs codex in full-auto / yolo mode (
--dangerously-bypass-approvals-and-sandbox) - Supports a
-w [name]flag that creates a git worktree at~/.worktrees/<repo-name>/<name>from the current HEAD, then opens codex inside it. If no name is given, auto-generates one from the current timestamp (e.g.codex-20260307-143022).
Add this to your shell config: