Guide
Codex CLI multiple sessions: parallel work without branch chaos
Codex CLI is fast for single tasks. When you start several Codex sessions at once, the workflow needs more structure: separate branches, visible status, and a review step before anything lands.
What "multiple Codex sessions" should mean
The simplest version is several terminal windows. The safer version is several isolated worktrees. Each Codex session gets its own folder, its own branch, and its own diff to review.
That distinction matters. Without isolation, one Codex run can change files that another run is still reasoning about. With isolation, you can compare the outputs and choose what to keep.
Good parallel Codex tasks
- One session fixes a narrow bug while another adds regression tests.
- One session explores a refactor while another keeps the current approach minimal.
- Several sessions try different implementation strategies for the same feature.
- One session updates docs while another handles code changes.
Recommended workflow
- Start each Codex task from a fresh branch and worktree.
- Use clear worktree folder names and branch names so each session's purpose is obvious.
- Monitor completion and errors without cycling through terminals.
- Review the final diff branch by branch.
- Push only the branches that are worth keeping.
Where Baton helps
Baton gives Codex CLI a workspace layer: quick workspace creation, worktree isolation, notification hooks, visual diffs, live file follow, and pull request handoff from the same app.
When not to run in parallel
Do not parallelize tasks that depend tightly on each other. If one Codex session must read the result of another, finish and review the first branch before starting the second. The goal is faster independent work, not more merge conflicts.
Related Baton pages
See the Codex CLI GUI page, git worktrees guide, and the broader multiple AI coding agents guide.
To run Codex CLI this way, download Baton or compare all supported CLI coding agents.