Step-by-step instructions
- 1
Step
Create a disposable workspace
YOLO-style runs are useful for speed, but they should start in a disposable or clean Git-controlled workspace.
mkdir -p /tmp/codex-yolo-lab && cd /tmp/codex-yolo-lab && git init - 2
Step
Start with a narrow task
Even in permissive mode, a narrow task reduces surprise edits and makes review faster.
codex exec --skip-git-repo-check "Create a tiny hello.ts script and run it" - 3
Step
Use approval skipping only when you accept the risk
Approval skipping trades safety for speed. Keep sandboxing enabled where possible and limit the working directory.
codex exec --approval-mode never --sandbox workspace-write "Implement the requested change and run tests" - 4
Step
Review every diff before keeping it
Treat the diff as the source of truth. Revert anything surprising before copying changes into a real project.
git diff --stat && git diff --check && git status --short
Why this matters
Approval skipping is powerful for fast experiments, but it removes the human checkpoint. A disposable workspace, narrow prompt, sandbox, and diff gate make it practical instead of reckless.
Troubleshooting
- If Codex edits too many files, stop and reduce the prompt scope.
- If tests fail, inspect the diff before running another agent pass.
- If you need unrestricted access, use a throwaway VM or copy, not your main machine.
Related tutorials
Microsoft Copilot Studio
Build a Microsoft Copilot Studio customer intake agent for service businesses
Create a Copilot Studio agent that qualifies customers, captures service details, stores lead data, and routes urgent requests to your team.
Copilot
How to Install GitHub Copilot CLI on Mac and Windows
Step-by-step guide to installing the GitHub Copilot CLI extension. Learn how to authenticate and run gh copilot suggest and explain in your terminal.