08 | Codex Subagents: Division of Work, Ownership, and Merge
A Subagent isolates thinking noise
The upstream guide does not equate multi-agent work with opening more windows. A Subagent isolates exploration, review, or implementation around a distinct question and returns structured results to the main thread. It fits independent work with clear deliverables: parallel read-only review, module research, or separate file sets with clear owners.
Do not introduce parallelism for one small change, tightly coupled files, or work with no clear acceptance criteria.
Write a task card before starting
Every subtask should answer these questions:
Goal: the conclusion or change to produce.
Mode: read-only review or limited-scope writing.
May Read / May Edit: allowed files or directories.
Must Not: prohibited areas and actions.
Return: conclusions, evidence, changes, risk, and next steps.
This is more useful than “look at this module.” It tells the subthread when to stop and tells the main thread how to use its result.
File ownership is central to writing collaboration
The course repeatedly emphasizes assigning file ownership before parallel writes. One file should have a clear owner at a time; shared boundary files should be handled by the main thread or in an agreed sequence. Apparently separate tasks can still collide through formatting, dependency updates, or shared types.
For stronger isolation, combine Subagents with Git worktrees: branches work in separate directories, then the main thread reviews and merges them. A worktree isolates the working area; it does not replace task boundaries or merge checks.
Merge from evidence, not by concatenation
The main thread should confirm which findings have evidence, where suggestions conflict, which changes were verified, and what risk remains. For a PR review, separate agents may inspect functionality, tests, and security, while the main thread delivers one coherent conclusion.
The upstream training path starts with parallel read-only work, then moves to file-scoped writes, review agents, and reusable task templates.
CODEX APP: FROM INSTALLATION TO TEAM WORKFLOWS