Official References: Best Practices · Subagents · Review · Worktrees
Curriculum path
- Codex Getting Started — Install, First Task, and Git Checkpoints — first safe loops
- Codex Instructions — Make AGENTS.md Actually Useful — repo rules and defaults
- Codex Sandboxing — Permissions, Approvals, and Cloud Environments — permissions and boundaries
- Codex Task Design — Write Prompts Like Issues, Not Wishes — shape work well
- Codex Skills — Turn Repeated Prompts into Reusable Workflows — turn repeated work into reusable assets
- Codex Subagents — Parallel Execution and Delegation Patterns — parallel execution and delegation
- Codex MCP — Connect External Context Instead of Copy-Pasting It — connect outside systems
- Codex Reviews and Automations — /review, Worktrees, and Repeatable Engineering — run stable workflows repeatedly
- Codex Worktrees — Isolated Parallel Execution Without Branch Chaos
- Codex Handoffs — Turning Parallel Lanes into Merge-Ready Outcomes ← You are here
- Codex Verification Loops — Prove It Works Before You Merge
- Codex Release Readiness — Final Gates Before Production
- Codex Safe First-Day Loop — Beginner Workflow That Avoids Early Mistakes
- Codex Team Delivery Playbook — Intermediate Lane Operations
- Codex High-Risk Change Governance — Advanced Controls for Critical Releases
- Codex Operating Manual — Daily, Weekly, and Release Rhythms for Teams
- Codex Incident Recovery Playbook — Deterministic Response Under Production Pressure
- Codex Post-Incident Hardening Loop — From Recovery to Durable Controls
- Codex Chaos Resilience Drills — Rehearsing Failure Before It Finds You
- Codex Resilience Metrics and SLOs — Measuring Reliability Before It Fails
- Codex Ralph Persistence Loops — Running Long Tasks to Verified Completion
Official docs used in this guide
- Task decomposition and explicit constraints — Best Practices
- Parallel lanes via delegated workers — Subagents
- Diff-scoped review checkpoints — Review
- Branch/file isolation model — Worktrees
Why handoffs are where quality leaks
Many teams can generate code quickly with Codex. Fewer teams can transfer work cleanly between lanes.
Handoffs usually fail when one of these is missing:
- current goal status
- evidence from verification
- exact diff scope
- risk notes and rollback path
- explicit next owner
If even one field is missing, the next lane has to rediscover context. That is where time and quality disappear.
The minimum handoff contract
Treat each lane-to-lane handoff like a small API. Require these five fields every time:
- Goal status — done / partial / blocked
- Evidence — lint/tests/build output (or explicit reason omitted)
- Diff scope — what changed and where
- Risk note — rollback path and unresolved edge cases
- Next owner — exactly who takes the next action
A compact contract beats long narrative summaries.
Evidence depth by change type
| Change type | Minimum evidence | Recommended evidence |
|---|---|---|
| UI/content-only updates | lint + local render sanity | lint + build + screenshot check |
| Refactor without behavior change | lint + target tests | lint + tests + review scope snapshot |
| Auth/billing/security logic | lint + tests + build | lint + full tests + reviewer sign-off + rollback note |
| Migration/data shape change | lint + migration checks | lint + migration tests + rollback plan + verifier lane |
The higher the blast radius, the heavier the handoff evidence should be.
Copy-ready handoff template
### Handoff: <lane-name> -> <lane-name>
- Goal status: done | partial | blocked
- Evidence:
- lint: <pass/fail + command>
- tests: <pass/fail + command>
- build: <pass/fail + command>
- Diff scope:
- changed dirs: <list>
- notable files: <list>
- Risk note:
- rollback path: <short>
- unresolved edge cases: <list or none>
- Next owner: <person/role/lane>
- Next action due: <date/time or trigger>Use the same template in issues, PR comments, or internal runbooks. Consistency matters more than tool choice.
Lane routing patterns that work
Pattern A — Explore then execute
- Subagent lane explores 2–3 options.
- Main lane selects one option.
- Worktree lane executes.
- Verification lane validates before PR.
Pattern B — Execute + independent verify
- Implementation worktree ships code candidate.
- Separate verification worktree reruns checks and audits diff.
- Reviewer lane decides merge or rework.
Pattern C — Release-safe docs flow
- Implementation merged.
- Docs/release lane updates docs and release notes only.
- Reviewer confirms user-facing consistency.
The pattern is less important than keeping ownership explicit at every step.
Common handoff anti-patterns
“Looks good” without command output
Without evidence, the next lane repeats verification from scratch.
“Someone should review this” without naming owner
Work stalls in an ownership vacuum.
Huge mixed diff handed to verifier
Verifier cannot isolate risk quickly. Split into narrower lanes earlier.
Risk known but rollback unspecified
Teams discover rollback strategy during incident time, which is too late.
Fast pre-merge handoff audit (15 minutes)
Before merge, ask:
- Are all five handoff fields present?
- Is evidence fresh (not copied from older runs)?
- Does diff scope match the stated goal?
- Is there a named next owner for each remaining action?
- Is rollback realistic for the changed surface?
If one answer is no, do one more handoff cycle.
Escalation protocol for blocked lanes
When a lane is blocked for more than one cycle:
- mark status as
blocked - attach concrete blocker evidence
- propose one fallback path
- assign next owner explicitly
- timebox next check-in
Blocked lanes are normal. Unowned blocked lanes are expensive.
Solo-developer version
Even alone, keep the same contract between your own phases:
- builder-you
- verifier-you
- reviewer-you
It feels redundant at first, but it prevents self-confident blind spots.
Quick checklist
Before handoff:
- five contract fields completed
- evidence attached
- next owner named
Before merge:
- verifier lane feedback resolved
- review scope clean
- rollback path documented
Great Codex output is not enough. Great handoffs are what make parallel workflows reliable at team scale. Then use Codex Verification Loops to standardize proof quality before merge.