Spawn workers with one task record each, bounded authority, and a parent correlation id. The parent must receive a result or a failure for every worker it accepted.Coordinator-worker spawn flow
Delegate bounded subtasks.
delegated_task_spawnRECORD STATUSCandidate · v0.1.0UML class view
The proposed contract drawn as participant roles, received calls, and numbered dependencies.
Object interactions
The same roles and calls as a class collaboration and a numbered message sequence.
Pointcut
Where the mechanism applies. All four dimensions belong to the proposed match, not just its vocabulary.
- Context
- A coordinator delegates a bounded task to another execution unit.
- Trigger
- A worker is spawned, called as a tool, or handed a task.
- Structure
- Task envelope with identity, instructions, authority, budget, and result target.
- Effect
- Worker output returns to the coordinator with explicit lifecycle and provenance.
Protected contract
The obligation that clients, operators, and auditors should be able to rely on.
- Requires
- Parent and child identities, task scope, and shared data policy are known.
- Ensures
- Each worker has one task record, bounded authority, and a correlated result.
- Invariant
- Delegation never silently expands permissions or budget.
- Violation
- Cancellation, worker failure, timeout, and duplicate spawn are typed outcomes.
Negative control
Sequential calls to independent agents without delegation do not count.
Variation & lifecycle
The hot spot is admitted only where the protected semantics survive.
Permitted variation
Sub-agent, agent-as-tool, background agent, child session, and worker pool.
Test obligation
Test authority, timeout, cancellation, duplicate results, and context isolation.
Evolution question
Did delegation gain nested history, approvals, and background lifecycle?
Prompt + code design
An illustrative prompt and a small design sketch for the proposed contract. Names and APIs are invented; this is not a repository excerpt.
def spawn(parent, task, authority):
worker = parent.runtime.spawn(
task=task,
parent_id=parent.id,
authority=authority.intersect(parent.authority),
budget=task.budget,
)
parent.register(worker.id, task.id)
return workerIllustrative design sketch. A child without a task record is an orphan; a parent without a result is incomplete. This example is a teaching aid, not implementation evidence or a conformance claim.
Detection & matching
The frozen rule that retrieves this record, the canonical source exemplar, and the control that should stay unmatched.
- Join point
delegated_task_spawn- Source locator
- Barbaste et al., §6.4, p. 16 (“Coordinator-Worker Pattern”); Table 11 “Recursive Composition”, p. 52; adapted label
- Lexical cue
(?i)\b(?:spawn(?:ed|ing)?|sub[_-]?agent|worker[_-]?agent|delegate(?:d|s|ion)?)\bFrozen expression, v0.1.0. A match is a retrieval cue, not a confirmed implementation.- Aliases
- None
- Canonical exemplar
- OpenHands/software-agent-sdk
openhands-sdk/openhands/sdk/subagent/schema.py:202Support: tests/sdk/subagent/test_subagent_registry.py:1 - Negative control
- Sequential calls to independent agents without delegation do not count.
Scope-anchored review. pohe-agent analyze <repo> --pattern P12 anchors the cue to its enclosing declaration and checks a separate operational signature for all four pointcut dimensions. Missing roles and negative-control risks remain visible; a structural match is not E2/E3. Calibration report ↗
Repository files
Up to five public files retrieved by the frozen cue and pinned to the audited commit. A match is a place to inspect, not a confirmed implementation.
openhands-sdk/openhands/sdk/subagent/schema.py:202CANONICAL SOURCE02aaif-goose/goosecrates/goose/src/acp/handoff.rs:1RETRIEVAL CUE03affaan-m/ECCskills/council-multi-model/scripts/review-with-codex.js:116RETRIEVAL CUE04agno-agi/agnolibs/agno/agno/context/fs/provider.py:86RETRIEVAL CUE05Aider-AI/aideraider/run_cmd.py:13RETRIEVAL CUEEvidence & provenance
Each layer answers a different question. Do not substitute retrieval for review.
Source-located exemplar
A concrete source anchor is available for this proposed record. It is one exemplar, not evidence that all repositories—or every contract field—conform.
Review boundary: this candidate and its specification come from an AI-assisted study. Independent human validation remains open.
100.0% of repository families in the frozen panel have at least one current cue, historical cue, or canonical source layer. This is not confirmed prevalence.
Current lexical-cue repositories: 40 / 415c524ad65d81openhands-sdk/openhands/sdk/subagent/schema.py:202tests/sdk/subagent/test_subagent_registry.py:1Subagent task and permission envelope.
Exploratory retrieval cue Regex / v0.1.0
(?i)\b(?:spawn(?:ed|ing)?|sub[_-]?agent|worker[_-]?agent|delegate(?:d|s|ion)?)\bThis expression is a discovery instrument only. A match is a retrieval cue—not a confirmed implementation, pointcut match, or contract proof.