CDX-101 · Module 4

Parallel Development

3 min read

The Codex app (web interface) supports running multiple agent threads simultaneously, each working on a separate task. This is fundamentally different from sub-agents — each thread is a fully independent Codex session with its own context window, working in its own git worktree. You can have one thread refactoring authentication, another building a new API endpoint, and a third writing documentation — all running concurrently.

Codex manages git worktrees automatically. Each thread gets its own branch and working directory, so parallel tasks cannot interfere with each other at the filesystem level.

This pattern maps closely to how senior developers think about parallelism. You mentally decompose a large project into independent work streams, assign each to a thread, and then review and merge the results. The difference is that each "developer" completes their task in minutes rather than days.

The practical workflow: (1) Decompose your project into independent tasks. (2) Create a thread per task with a clear prompt. (3) Let them run. (4) Review each thread's output. (5) Merge the branches.

Do This

  • Decompose large projects into independent, non-overlapping tasks
  • Use one thread per task — keep scope tight
  • Review each thread's output individually before merging

Avoid This

  • Create threads for tasks that modify the same files — merge conflicts are painful
  • Launch 10 threads without clear task definitions — quality drops with vague prompts
  • Skip the review step — parallel does not mean unreviewed

Claude Code supports a similar parallel workflow via Agent Teams (experimental), where sub-agents work in separate worktrees coordinated by a lead model. The core idea is identical — decompose, parallelize, review, merge — but the implementation differs. Codex's thread model is more user-facing (you see each thread in the UI), while Claude Code's agent teams are more programmatic (coordinated by the lead agent).