Parallel only when the work can stay independent
After this, you'll be able to split a Codex task into independent subagent jobs and keep approvals, sandbox, and merge decisions under control.
Complete Add skills, plugins and computer use without bloat first.
Subagents help when the work is genuinely parallel. A subagent is a helper Codex starts to do one part of the job. You start them by asking in your prompt, and they work in the app, the terminal version and the IDE extension.
Codex can spawn (start) several at once and collect what they find. That's useful for codebase exploration, independent audits, or a multi-step plan with clean boundaries.
Parallel work needs real isolation. A good subagent task has its own files, its own question, or a read-only exploration goal. A bad one edits the same component, changes the same API contract (the agreed shape of how two parts of the code talk), or needs constant coordination.
Several helpers use your plan's allowance faster. On Plus, the strongest model allows only a few messages per five-hour window, so pick the everyday model for long runs.
Subagents still inherit the current sandbox policy. The same permission boundary applies, and an approval prompt can surface from a helper's conversation you aren't looking at, so check which subagent is asking before you say yes.
Ask: Which helper is asking, and what is its task? In the app, each helper has its own thread you can open to see what it is doing. In the terminal version, the prompt shows the helper's label, and you can open its thread first.
To stop a helper that's going wrong, tell Codex in the main chat: Stop the helper that is [doing X], and close its thread. Then check that no new steps appear in that helper's thread. The main chat should also say it stopped.
Codex comes with three built-in helpers named default, worker and explorer. You can also define your own as small settings files (TOML files) in a .codex/agents folder, and ask Codex to write one for you. A setting called max_concurrent_threads_per_session caps how many run at once, and subagents are on by default.
In Claude Code and Antigravity: Claude Code has built-in Explore (read-only), Plan and General-purpose helpers, each with its own separate memory of the conversation, and you add your own as Markdown files in .claude/agents/ (ask Claude to write one). Antigravity's main agent starts subagents that inherit its permissions and can work in their own worktrees, and /swarm adds named workers plus a checker on Pro and Ultra plans.
Start sequential when the contract is still uncertain. Split into parallel work only once a first pass has named the files, the shared types, and the proof.
One finds which files build each page, one finds the tests, and one checks the docs. Bring me their findings, and don't edit anything.
Your own conversation with Codex is the main thread. A reply might start: I'll start three read-only subagents, each with its own question.
Nothing gets edited until I compare their findings. If one asks for approval, I'll tell you which one.
Why it works: the After split the work into independent questions with no shared files. The main thread kept the edits and the final call.
The goal is faster evidence, not more edits happening at once.
Paste this into Codex
Decide whether to use Codex subagents. This time you fill in only two fields; the rest you work out yourself. Task: [describe task] Final merge owner: [you, Codex main thread, unknown] Work out for yourself which parts are independent, which files or agreements they share, which parts can be read-only, and how risky the approvals are. No task of your own? On the practice folder the honest answer is to stay sequential, because two small files fit in one prompt. Say so, then plan a pretend job big enough to split: a 30-page recipe site to check for broken links, in three read-only batches of ten pages. Return: 1. Use subagents or stay sequential. 2. Subagent briefs if yes. 3. Shared contract each subagent must respect. 4. Approval rule for inactive subagent prompts.
What a good response looks like
1. Practice folder: stay sequential, since two small files fit in one prompt and helpers would only add cost. The pretend 30-page recipe site: use three read-only helpers. 2. Helper A: check pages 1 to 10 for broken links and list each one. Helper B: pages 11 to 20. Helper C: pages 21 to 30. None edits anything. 3. Shared contract: all three only read, all report in plain words with page names, and none renames or moves a file. 4. Approval rule: if a helper asks to run or write something, I stop, read which helper asked and why, and say no unless it is only a read. The main chat merges the three lists and makes the decision.
Check yours against
Use Codex to help you split a Codex task into independent subagent jobs and keep approvals, sandbox, and merge decisions under control. Start with the exercise prompt and your real input. Ask for one draft, then check it against this proof: Subagents are used only for independent parts. Accept only the version you can verify yourself.
You can identify independent work
Pulling this out of your own head now is the part that actually moves it into long-term memory. Re-reading only feels like it does.
Think of a task of yours with two parts that do not depend on each other. Write how you'd split it, the boundary each part gets, and who decides at the end.
One good answer: 'Audit my store theme: one subagent lists slow pages, another lists broken links. Each only reads, no edits. I review both reports in the main thread and decide.' Check yours: if the parts are independent and the main thread keeps the decision, that works.
Use subagents for independent evidence or isolated work. Stay sequential when the contract is still unclear.