Delegate Parallel Investigation

Lesson 9 · Cloud and subagents · ~11 minutes

Parallelism helps when tasks are independent and read-heavy. It hurts when several agents write overlapping files or require constant shared decisions.

MechanismBest fit
SubagentsParallel exploration, testing, triage, or specialist review
Cloud taskHosted asynchronous work against a pushed repository
Local worktreeIsolated work using your machine and local tools

Delegate Bounded Outputs

Spawn three read-only subagents:
1. Trace the authentication flow.
2. Identify test gaps around token refresh.
3. Review logging for credential exposure.

Wait for all three. Return one deduplicated report
with evidence and file references. Do not edit files.
Keep the main thread clean

Subagents should return distilled findings, not raw logs. Keep requirements, decisions, and synthesis in the main thread.

Run the Independence Test

Two tasks are safe to parallelize when neither requires the other’s intermediate decisions, they do not edit overlapping state, and their outputs can be merged by a clear rule.

ShapeParallel?
Security review and test-gap review of the same diffYes; read-only perspectives
Two agents redesigning the same moduleNo; shared decisions and files
Compare two prototypes in separate worktreesYes; isolate and define comparison criteria
Schema change followed by dependent API changesUsually sequential

Budget for Coordination

Each subagent performs its own model and tool work. Parallelism costs more tokens and adds synthesis overhead. Use it when elapsed time, independent evidence, or context isolation is worth that cost.

  1. Give each worker one bounded question.
  2. State read/write authority explicitly.
  3. Require evidence and file references.
  4. Define who resolves contradictions.
  5. Wait for all required results before synthesis.
Cloud is a different environment

A cloud task starts from repository state available to its environment, not every untracked local artifact. Confirm the commit, setup script, dependencies, secrets policy, and internet settings before delegating.

Check Your Understanding

Three independent read-only audits are needed. What is the strongest delegation shape?
Correct. Independent read-heavy scopes parallelize cleanly.
Parallel writers increase conflicts; focused read-only subagents fit this decomposition.

Do This Now

Take one review question and split it into two independent evidence-gathering tasks. Define authority, output schema, evidence requirements, and the rule the main agent should use to deduplicate or resolve conflicting findings.

Primary Sources

Subagent concepts and Codex cloud.

Questions? Show me a proposed decomposition and I will point out hidden coupling before you parallelize it.
← PreviousNext →