← Blog

Engineering · · 4 min read

When should the parent agent stop waiting for a missing child?

Define required results, deadlines, late arrivals, and partial completion for parallel agent workflows.

Deixic

Three agents start a release assessment. Two return findings. The third stays active after its tool connection fails. The parent either waits forever or writes a confident assessment from two results; neither tells the user what happened to the third.

A LangGraph report about parallel execution shows why graph shape and execution behavior need a concrete reproduction. Running branches together is easy; a production workflow needs a precise rule for joining results.

Define the join before dispatch#

List which child results are required and what each must contain. Some tasks require every result; others proceed with a quorum or an explicitly partial answer. Decide from the user outcome, never from which branches finish first.

For a release assessment, security review is required and a documentation summary is optional; for brainstorming, any two suggestions suffice. The runtime knows this before any failure.

LangGraph's Graph API provides graph and state primitives for parallel execution. Your application defines whether the findings satisfy the business outcome.

Work through the missing review#

Child A checks test evidence, child B inspects configuration changes, and child C checks the user-facing migration instructions. Each child receives a scoped task, a deadline, and an output contract; the parent stores their identities and expected results.

Child C produces a partial note and then loses its connection. The note is retained but does not satisfy the required migration review. The parent can retry a safe read within budget, continue independent assembly, or return a partial assessment naming the missing review.

If the user asked only for analysis, the parent delivers the completed sections with that limitation. If the user asked for a release decision requiring all three checks, the decision stays incomplete.

Child state Parent interpretation Next action
Completed and validated Required contribution satisfied Include result
Completed but malformed Work returned, contract unmet Repair or reject result
Failed with recoverable read error Contribution missing Retry within a fixed budget
Timed out after a write Outcome uncertain Reconcile the write
Still active past deadline Contribution unresolved Stop waiting and report the gap
Optional child unavailable Required work can still complete State the omitted scope

Validate the contribution, not its confidence#

A child's "done" is not enough. Check that the artifact exists, references resolve, and required fields are present. For code, inspect the changed files and verification; for research, inspect sources and unresolved questions.

The parent tests the properties that make the contribution usable: a source list without findings is incomplete, and so is a conclusion without source references.

The guide to test receipts explains why claimed verification needs concrete evidence. Apply the same idea at the join and accept evidence in place of a status word.

Handle late results deliberately#

A missing child can finish after the parent has returned a partial answer. Decide whether the late result updates a draft, triggers a new review, or waits for the next task, and make any change to a delivered conclusion visible.

Attach a parent task version to child results: a result for an earlier scope does not complete a task whose requirements changed. If the user narrowed the work mid-run, the parent evaluates the old result against the revised request.

Cancellation needs the same precision: stop unnecessary future work, then reconcile any external action already submitted. A silent child can still have a provider job running.

Test the join under disorder#

Use fixtures where children finish out of order, one delivers twice, one returns after the deadline, and one returns an artifact for the wrong parent version. Assert the permitted final states and what the user sees.

For the release assessment, one test requires all mandatory review results before a complete decision; a separate test permits a partial research answer that names the missing section. These are different completion contracts.

Store the join rule with the parent task definition so a resumed parent uses the original contract. Use action history to inspect routed work and recovery guidance for interrupted steps. The next parent agent inherits the required-result list, deadline policy, and late-result rule instead of improvising after a child goes quiet.