Large Codex reviews can bury the main thread in exploration logs, test output, and partial findings before a decision is ready. A subagent workflow keeps the main session focused by asking Codex to start bounded parallel agents, wait for their summaries, and return one consolidated answer.
Current Codex releases enable subagent collaboration by default. Child agents work in separate threads while sharing the parent session's permission policy. Explicit assignments keep their review questions separate, and project instructions can also request delegation.
Parallel agents fit read-heavy work because simultaneous edits can conflict. A terminal session needs an installed Codex CLI, a signed-in model provider, and a project you have permission to inspect. Each child performs its own model and tool work, so delegation consumes more tokens than a comparable single-agent review.
Trusting a folder permits its settings to run code automatically. An unfamiliar repository needs inspection before it is trusted.
Steps to run a Codex subagent workflow:
- Change to the project directory to be inspected.
$ cd /work/example-app
The path represents the repository to inspect. The request uses its README.md and app.py; if the project uses different filenames, those names belong in the request instead.
Related: How to set the working directory for Codex
Related: How to check Codex login status - Start an interactive Codex session with a read-only sandbox.
$ codex --no-daemon --sandbox read-only
The session stays in the foreground without a shared background server. The parent and children inherit the read-only sandbox and the active approval policy. Do not approve an unexpected request to run outside the sandbox.
Related: How to set Codex approval policy - Approve folder access only for the intended trusted project if prompted.

- Submit two independent read-only questions with an explicit wait instruction.
Use exactly two parallel subagents for a read-only review of this project. Ask the first how README.md says to run the program and what it requires. Ask the second how app.py chooses the greeting recipient and what it prints by default. Each agent must inspect only its assigned file, report at most two sentences with file and line references, and create no further agents. Do not edit files or run commands that change state. Wait for both agents, then combine their answers under Run and Behavior in at most four sentences with file references.
The filenames must match the project. Each question bounds one agent's job, and the wait instruction keeps both answers in the parent response.
- Open the subagent picker after the two threads appear.
/subagents
The picker lists the main thread and its children. Completed children remain selectable even when the running list is empty. The separate /agents command opens the broader agent command center.
- Return to the main thread with Escape.
The picker closes without discarding the parent response.
- Confirm that the parent response answers both questions with file references.
The Run answer identifies the README instructions and requirements. The Behavior answer explains the default greeting and recipient option in app.py. An agent list alone does not establish that the parent collected both results. A missing answer, absent file references, or a model error leaves the workflow incomplete.