Proposal: experimental codex multiverse command for parallel solution evaluation
Resolved 💬 3 comments Opened Mar 4, 2026 by ranausmanai Closed Apr 11, 2026
I read the contribution policy and I know code contributions are by invitation.
I am opening this issue first to check if this direction is useful.
Problem
codex exec gives one solution path at a time.
For risky or ambiguous tasks, one path is often not enough.
Proposal
Add an experimental codex multiverse command that:
- Creates N git worktrees from the same base
- Runs N variants in parallel
- Runs test commands per variant
- Scores variants using objective signals
- Selects and reports a winner
Why this is useful
- Reduces first answer bias from a single run
- Catches wrong solutions that look correct
- Prefers safer and cleaner patches when multiple variants pass
- Produces a report with clear evidence for the selected winner
What I already built and tested locally
I implemented a working prototype in a local branch with:
codex multiverseCLI command- Parallel worktree execution
- Test command support (
--test-cmd) - Scoring based on test pass/fail, churn, risk markers, and critical file touches
- JSON report output with winner and per variant metrics
- Cleanup option for generated worktrees and branches
I also added:
- Unit tests for scoring and parsing logic
- Integration tests for winner selection and cleanup
- Docs page for usage and behavior
Practical proof run
I ran a controlled test with 3 variants:
- Variant 1: correct output but risky and noisy changes
- Variant 2: wrong output and failing test
- Variant 3: correct and clean output
Result:
- Variant 3 won
- Variant 1 was penalized for risk and critical touches
- Variant 2 lost due to failing test
This confirmed that ranking is based on measurable outcomes, not random selection.
Question for maintainers
Is this feature direction aligned with the Codex roadmap?
If yes, I can share a clean patch and adjust design details based on your preferred behavior and constraints.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗