Subagents are best for independent exploration, tests, triage and review. Parallel writing to the same files creates coordination cost and conflicts, so keep the discovery phase read-only unless work is explicitly partitioned.
1. Define independent review dimensions such as security, tests and maintainability
Define review axes that are genuinely independent—security boundaries, missing tests and maintainability are better than three agents all asked to “review the code.” Independence reduces duplicated findings.
2. Ask Codex to spawn one subagent per dimension and wait for all of them
Create one subagent per axis and make the parent wait for all of them. Give each agent the same target diff and forbid edits so their outputs remain comparable and cannot race on shared files.
3. Require file references, evidence and uncertainty from every subagent
Require file/line references, evidence, severity and uncertainty for every finding. A vague concern without a concrete path should be treated as a question to investigate, not as a defect.
4. Keep shared-code edits disabled during the parallel review
Keep the parallel phase read-only. If an agent wants to test a hypothesis, let it run tests or inspect files, but route any code changes back through the parent after synthesis.
5. Let the main thread deduplicate findings, resolve contradictions and choose the fixes
Deduplicate findings in the parent, resolve contradictions and choose fixes based on evidence and impact. Preserve minority findings when they point to a plausible high-severity failure that still needs checking.
Review this branch with parallel Codex subagents. Spawn one read-only agent for security, one for test gaps and one for correctness/regressions. Wait for all three. Each finding needs file references and a concrete failure case. The main thread should deduplicate and rank findings before any edits.
Spawning several agents to edit the same files; using agents for dependent steps; no evidence requirement; summarizing before all agents return; turning every observation into a patch.
Finish check
The final review contains a deduplicated set of evidence-backed findings, you can open individual agent threads if needed, and no code changed during discovery.