Level 6 Practice: Build a Harness for Permissions and Validation
About 5 minutes
About This Tutorial
Section titled “About This Tutorial”For the concepts and completion standards, first read Codex Levels 0-10.
Written cautions alone cannot reliably prevent dangerous actions or missed checks. Level 6 makes normal paths and human-approval boundaries enforceable.
What You Will Complete
Section titled “What You Will Complete”You will produce a harness covering approvals, prohibitions, and checks. The goal is not the amount of work; it is a reproducible Level 6 delegation boundary and completion check.
Step 1: Set the Boundary
Section titled “Step 1: Set the Boundary”Before handing work to Codex, state the goal, scope, exclusions, and completion criteria. Adapt this prompt to your project.
Design a Codex harness for this repository. Separate normal work, approval-required actions, prohibited actions, validation commands, and failure procedures. Identify rules that can be checked mechanically.Check: Continue only when Codex can restate the scope and unresolved questions before acting.
Step 2: Practice
Section titled “Step 2: Practice”- Define boundaries for protected folders, secrets, destructive actions, and production operations.
- Define mandatory checks plus stop-and-report behavior for failures.
- Separate canonical shared rules from runtime adapters and add synchronization checks.
Keep the scope stable and inspect the output or diff after each stage.
Step 3: Verify Completion
Section titled “Step 3: Verify Completion”You are done when safe work is reproducible, risky actions stop before execution, and rule violations are detectable.
Record the actions performed, supporting evidence, and anything not verified. Also record why work stopped when a condition was not met.
Troubleshooting
Section titled “Troubleshooting”Codex exceeded the requested scope
Section titled “Codex exceeded the requested scope”Stop the task and inspect the diff. Add explicit owned files and exclusions to the prompt, then rerun only the approved scope.
Completion is difficult to judge
Section titled “Completion is difficult to judge”Replace vague criteria such as “implement it” with observable files, commands, pages, or review results.
Next Step
Section titled “Next Step”To break the completed harness into concrete components, use Codex Harness for AGENTS.md, configuration, Rules, Skills, Hooks, and validation.
Continue to Level 7 to expand the delegation boundary by one step.
See the references for the external specifications and background sources used on this page.[1][2][3]