Survey orchestrator/role relationships across vendors, verify nested
subagent support per runtime, and evaluate intra-stage function
specialists and a per-stage-session model for holocron#170.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_012CqgnwEGtmfsjcoG9QwByN
@@ -16,6 +16,18 @@ Use the plugin skills, which wrap the Gitea MCP tools (`mcp__gitea__*`); do not
- Apply triage state with the `Status/*` labels mapped in `docs/agents/triage-labels.md`.
- "Publish to the issue tracker" means create a Gitea issue; "fetch the relevant ticket" means read it with `gitea-issues`.
## Wayfinding operations
How the `wayfinder` skill's map and tickets map onto Gitea, which has native issue dependencies but no sub-issues.
- **Labels**: the skill's `wayfinder:<x>` labels are expressed as the Gitea scoped labels `Wayfinder/<X>`, matching the repo's `Scope/Value` convention: `wayfinder:map` is `Wayfinder/Map`, `wayfinder:research` is `Wayfinder/Research`, and so on.
- **Map**: an issue labelled `Wayfinder/Map`, paired with a milestone of the same title (`Map: <name>`).
- **Child ticket**: an issue whose body starts with `Part of #<map>`, assigned to the map's milestone, carrying exactly one type label (`Wayfinder/Research`, `Wayfinder/Prototype`, `Wayfinder/Grilling`, `Wayfinder/Task`) and no `Status/*` label.
| **Copilot in VS Code** | `preToolUse` | `toolArgs` | `deny` | Documented only loosely | Preview. Also reads the repo's `.claude/settings.json` hooks. |
| **Codex** | `PreToolUse` (covers shell and unified exec as `Bash`, plus `apply_patch` and MCP) | `tool_input.command` | exit 2 or `permissionDecision: "deny"` | **No**: `ask` is "parsed but not supported yet" and the tool call **continues** | Errors and timeouts can let the tool run. Project hooks are skipped until a human trusts them (hash-pinned). |
| **Gemini CLI** | `BeforeTool` | `tool_input` (raw tool args) | exit 2 or `decision: "deny"`/`"block"` | Not documented | Other exit codes are non-fatal and the call continues. Project hooks are fingerprinted, with a warning on change. |
| **Cursor** | `beforeShellExecution` / `preToolUse` | `command` / `tool_input.command` | exit 2 or `permission: "deny"` | `beforeShellExecution` yes. `preToolUse` accepts `ask` in its schema but does not enforce it. | Fails open by default; `failClosed: true` per hook. |
**Every vendor says hooks are not a boundary.** Codex: "Treat tool hooks as a useful guardrail, not
a complete enforcement boundary". Claude's `if` field docs: "use the permission system rather than a
hook to enforce a hard allow or deny". Claude permissions: a Bash rule "isn't a security boundary
around the program", and the docs point to the sandbox for enforcement that doesn't depend on the
command text ([Claude permissions](https://code.claude.com/docs/en/permissions)).
**Exit code 2 plus a stderr reason is the lowest common denominator for deny.** Claude, Codex,
Gemini and Cursor document it, and Copilot fails closed on any non-zero exit. A single script can
therefore deny portably. Only *ask* differs per provider.
## 3. Portable alternatives where hooks don't reach
| Layer | Mechanism | Strength | apm-shippable? |
|---|---|---|---|
| Host permission rules | Claude `permissions.deny`/`ask` (`Bash(kubectl apply *)`, `Read(**/.vault_pass*)`). Deny, then ask, then allow; a hook `allow` cannot override a deny or ask rule. Compound commands and subshells are split. | Matches the text Claude writes. It "doesn't match the same program invoked in a different form" (path, `sh -c`). | **No.** Settings keys are not an apm primitive and would be drift in `.claude/settings.json`. Use managed settings, user settings or `settings.local.json`. |
| Claude sandbox | `sandbox.filesystem.denyRead` on the vault password file, `allowUnsandboxedCommands: false`, `failIfUnavailable: true`. OS-level (bubblewrap/Seatbelt) and covers child processes. | Strong for file reads, whatever the command text. Command hooks and MCP servers run outside it. | No (settings). Claude only. |
| Wrapper scripts on PATH | `kubectl`/`helm`/`tofu` shims that refuse mutating verbs. | Weak: bypassed by an absolute path, `command -p` or a different PATH. Breaks humans who share the PATH. | No portable channel (apm `bin/` is user-scope, Claude-only, not on PATH). **Not recommended.** |
| pre-commit / pre-push | e.g. reject a committed file that should be vault-encrypted but lacks the `$ANSIBLE_VAULT` header. | Catches mistakes at commit time. Client-side and skippable with `--no-verify`. Cannot stop a runtime apply. | Out of scope for apm (`.pre-commit-config.yaml` in the infra repo). |
| Kubernetes RBAC | Agent kubeconfig bound to the built-in `view` ClusterRole. "This role does not allow viewing Secrets, since reading the contents of Secrets enables access to ServiceAccount credentials" ([k8s RBAC](https://kubernetes.io/docs/reference/access-authn-authz/rbac/)). | **Boundary.**`kubectl apply/delete` and `helm upgrade` fail server-side, whatever the shell form. It also keeps the Sealed Secrets controller key out of reach. `kubectl diff` needs server-side dry-run, which may need more than `view` (not verified here). | No: infra and credential setup. |
| Separate apply credentials | tofu: the agent gets plan-only or read-only provider and state credentials, and apply runs with credentials held by the human or CI. Ansible: no vault password and no privileged SSH key in the agent's environment. | **Boundary.** | No: infra and credential setup. |
| Forge branch protection | The Flux-watched branch accepts only reviewed merges, and the agent's Gitea token cannot push or merge to it. | **Boundary** for the GitOps path. | No: Gitea settings. |
## 4. Gaps named per provider
- **Claude Code: best covered.** The hook deploys and is honoured, with argument-level deny and real
`ask`. Gaps: the hook fails open on error unless `onFailure: block` is set. A user's
`disableAllHooks` turns off project hooks, and only `allowManagedHooksOnly` with managed hooks
prevents that. The permission rules and sandbox that would harden it are not apm-deliverable.
- **Copilot CLI: well covered.** Deny and ask both work, and errors fail closed. On the **cloud
agent** `ask` becomes `deny`, so HITL commands are simply blocked there, which is the correct
outcome. **VS Code** reads both `.github/hooks/` and `.claude/settings.json`. A package installed
for both `copilot` and `claude` targets therefore runs the guard twice in VS Code. That is
harmless for a deny-only idempotent script, but noisy.
- **Codex: deny only.** `ask` silently degrades to *allow* (the run is marked failed and the tool
call continues). The script must therefore emit `deny` for HITL commands on Codex, never `ask`.
apm skips the hook entirely unless `.codex/` exists, and Codex skips it until a human trusts it.
A fresh install is unguarded until someone runs `/hooks` to review it.
- **Gemini CLI: deny only, and the matcher does not translate.** A `Bash` matcher never fires on
`run_shell_command`, so ship the hook with no matcher (or `*`) and dispatch inside the script. apm
skips it unless `.gemini/` exists.
- **Cursor: not reliably reachable through apm 0.28.0.** The installed source applies no event
rename and no reshape for `cursor`, so a Claude-shaped `PreToolUse` entry lands verbatim in
`.cursor/hooks.json`, while Cursor's native events are camelCase with a flat
`{command, matcher}` schema. The apm docs say "Cursor accepts Claude aliases and maps them to
native names". Cursor's docs say it "supports loading hooks from third-party tools like Claude
Code", but the page fetched here did not detail the mapping. **I'm not certain this works.** Verify
with a real Cursor install before claiming coverage. Even when it works, `preToolUse` does not
enforce `ask` and fails open unless `failClosed: true`.
- **OpenCode and other hookless targets: no hook layer.** Only the credential layers apply.
## 5. Recommended layered design
1.**Instructions (intent).** Infra skills state the stance and tell the agent to propose the
command and stop. This costs nothing, but it is not enforcement.
2.**One portable guard hook shipped by the infra package (fast feedback, best-effort).**
- A single `.apm/hooks/` file on the `PreToolUse`/`preToolUse` event, **with no tool matcher**.
The script normalises the payload (`tool_input.command`, `toolArgs`, `command`) and ignores
Researched 2026-11-13 for holocron#170 (ADR-0031, GLOSSARY "Delivery team"). This note builds on
`docs/research/team-patterns/multi-agent-team-patterns.md` (branch `research/team-patterns`) and
does not repeat it: that note already showed that generic roles loading skills beat tool
specialists, and that orchestrator–worker with state passed by pointer is the standard shape. This
note gathers evidence and makes a recommendation. It does not decide anything.
## Question
How do multi-agent delivery teams relate an orchestrator or lead to its role agents in practice?
Which structure fits holocron's constraints: provider-agnostic apm, human on the loop, and state
passed by pointer through Gitea? Two scope additions are folded in. The first is function
specialists *within* a stage (test writer, implementer, QA). The second is a "stage lead per
session" model.
## Answer in brief
- **The orchestrator is almost always the main loop.** That is the main session, or code that
carries a prompt. It is not a separately dispatched agent. Where a vendor calls it an agent
(Anthropic's LeadResearcher, Magentic manager, CrewAI manager, Claude agent-team lead), it is
still the top of the loop, and in Claude agent teams "the main session is the lead for its
lifetime" [S7].
- **Orchestrators decompose dynamically, and fixed SDLC roles are rarer.** Orchestrator–workers
is defined by subtasks that "aren't pre-defined" [S1]. Fixed role chains appear in research
systems (MetaGPT, ChatDev, AgentCoder), in Anthropic's planner/generator/evaluator harness
[S21], and in VS Code's Plan→Implement→Review handoffs [S26]. The fixed role with the best
evidence is a **separate verifier or evaluator**, not a separate implementer.
- **Nested delegation is not portable.** Claude Code nests by default, up to three levels [S4].
Cursor allows one extra level [S14]. Gemini CLI forbids nesting [S13]. Codex blocks it by
default [S12][S27]. Copilot CLI is unverified. ADR-0031's *conclusion* (leaf role agents) stands
as the lowest common denominator. Its stated *reason* is out of date: Claude Code subagents can
now spawn subagents.
- **A fixed pipeline should be sequenced by deterministic code, with the LLM working inside each
stage.** Every framework says so: Anthropic workflows [S1], the OpenAI "orchestrating via code"
section [S8], Microsoft Agent Framework's "If you can write a function to handle the task, do
that" [S23], ADK graph workflows [S24], and the LangChain custom workflow [S17].
- **Recommendation:** keep leaf role agents and state passed by pointer. Replace the
cross-stage LLM Lead with **one session per stage**. Tracker labels and a small script sequence
the stages, and each session's main loop is that stage's lead, dispatching flat leaf
specialists. Inside *implement*, add a test-author step before the implementer and keep a
fresh-context verifier. Those are function specialists working one at a time, never parallel
writers.
## 1. Structural patterns in use
| Pattern | Who controls the flow | First-party examples |
|---|---|---|
| Orchestrator–worker or supervisor (agents as tools) | Main loop calls workers and keeps control | Anthropic orchestrator–workers [S1] and research system [S2]. Claude Code, Codex, Gemini CLI, Cursor and Copilot subagents [S4][S12][S13][S14][S25]. OpenAI `Agent.as_tool()`, "manager keeps control" [S8]. LangChain "Subagents: a main agent coordinates subagents as tools" [S17]. OpenHands `task` tool: "the parent blocks until the sub-agent finishes" [S28] |
| Hierarchical (nested supervisors) | Supervisors of supervisors | `langgraph-supervisor` supports multi-level setups, but its maintainers now recommend the supervisor pattern "directly via tools" for most cases (search-result snippet of [S29], not read in full). ADK hierarchical decomposition [S9]. Manager Devins spawning child Devins [S22] |
| Handoffs or swarm | Control passes peer to peer, and the active agent changes | OpenAI handoffs: "that specialist becomes the active agent" [S8]. `langgraph-swarm` [S29]. MAF Handoff [S23]. VS Code custom-agent `handoffs`, which are user-clicked and use `send: false` by default [S26] |
| SOP pipeline with fixed roles | A fixed sequence of persona roles | MetaGPT's "assembly line paradigm to assign diverse roles" [S15]. ChatDev's design, coding and testing phases via a chat chain [S16]. Anthropic's planner→generator→evaluator harness [S21] |
| Group chat or magentic | A manager selects the next speaker in a shared conversation | MAF Group Chat and Magentic, where Magentic is "a dedicated Magentic manager" with a task and progress ledger, built on AutoGen Magentic-One [S23]. MAF warns that performance outside the original Magentic-One design "is untested" |
| Workflow or graph (deterministic) | Code or graph edges | Anthropic prompt chaining [S1]. OpenAI code orchestration [S8]. MAF Sequential/Concurrent workflows [S23]. ADK graph and dynamic workflows, which are "deterministic processes that combine code logic and AI reasoning" (ADK 2.0) [S24]. CrewAI sequential process [S30] |
| Peer team with a shared task list | Lead plus self-claiming teammates | Claude Code agent teams. These are experimental, with "No nested teams", "Lead is fixed", and "Start with research and review" [S7] |
| Single agent plus skills | One loop that loads context | LangChain: "A single agent stays in control while loading context from skills" [S17]. Cognition [S3][S22] |
What vendors report working in production for coding, as of 2026: Cognition's April 2026
follow-up says "writes stay single-threaded and the additional agents contribute intelligence
rather than actions". In practice that means a generator–verifier loop in which review works best
"when the coding and review agents do not share any context beforehand", plus manager-and-children
map-reduce. It calls "arbitrary networks of agents negotiating with each other" "mostly a
distraction" [S22].
## 2. Orchestrator: an agent definition or the main loop? Role-less or fixed roles?
| Source | What the orchestrator is | Workers |
|---|---|---|
| Anthropic research system [S2] | A prompted LeadResearcher at the top of the loop. Only the lead is described creating subagents | Dynamic and per-query ("it can be any number") |
| Anthropic "Building effective agents" [S1] | "a central LLM" | "subtasks aren't pre-defined" |
| Claude Code [S4][S7] | The main session. `claude --agent X` makes the *main thread* adopt agent X. The agent-team lead is fixed to the main session | Generic built-ins plus user-defined agents |
| Codex, Gemini CLI, Cursor [S12][S13][S14] | "ChatGPT or Codex handles orchestration". Gemini: subagents are "exposed to the main agent as a tool" | Generic built-ins (worker, explorer, generalist and similar) |
| OpenAI Agents SDK [S8] | Either a manager agent (LLM) or code | Specialists |
| CrewAI hierarchical [S30] | `manager_llm` (auto-created manager) or a custom `manager_agent` | Persona roles |
| MAF Magentic [S23] | A manager agent with fixed Magentic-One prompts by default | User-defined specialists |
| Cognition [S22] | A manager Devin. Failure modes: managers are "overly prescriptive", and children wrongly assume they share state | Child Devins |
**Synthesis.** The orchestrator is the top of the loop. Packaging it as an "agent definition" is
just a way to hand that loop a prompt (`--agent`), and only some runtimes support it (§5). Generic
decomposition is the default. Fixed SDLC roles have direct evidence in their favour in only one
place: **separating the evaluator or verifier from the producer**.
- Anthropic's harness: agents "reliably skew positive when grading their own work", and tuning a
standalone evaluator to be skeptical is "far more tractable" [S21].
- Cognition: review without shared context works best [S22].
- Claude Code best practice: `/code-review` runs "in a fresh subagent that never saw your
conversation". Also, "Handing the same task to a subagent doesn't make the answer any better. A
fresh reviewer does help" [S31].
The evidence against fixed roles:
- In Anthropic's own harness, roles were *removed* as models improved. With Opus 4.6 the sprint
construct went, and the evaluator moved to a single pass at the end. The planner stayed, because
the generator under-scoped without it [S21].
- Anthropic's long-running harness used two "agents" that were the *same* system prompt and tools
with different first prompts. It left open whether specialised testing or QA agents do better
[S32].
- MAST found 14 failure modes across 1,600+ traces, including inter-agent misalignment [S19].
## 3. Nested delegation support (verified 2026-11-13)
| Runtime | Can a subagent spawn subagents? | Evidence |
|---|---|---|
| Claude Code (v2.1.323) | **Yes, by default, up to 3 layers** below main. `CLAUDE_CODE_MAX_SUBAGENT_SPAWN_DEPTH`, where `1` turns nesting off. A per-agent block is possible by omitting `Agent` from its tools. Agent teams: "No nested teams" | [S4][S7] |
| Codex CLI | **No, by default.** Multi-agent V1 uses `agents.max_depth` with default `1` (root=0, so children cannot spawn), and it is configurable. The opt-in V2 (`multi_agent_v2`, `default_enabled: false`) ignores `max_depth`. The current public docs no longer list `max_depth` | Source `codex-rs/core/src/config/mod.rs``DEFAULT_AGENT_MAX_DEPTH: i32 = 1`, `features/src/lib.rs`, commit `69231e1` (2026-11-13) [S27]. Docs [S12] |
| Cursor (2.5+) | **One extra level.** The main agent and its direct subagents can spawn, "but a subagent launched by another subagent can't launch further ones" | [S14] |
| Copilot CLI | **Unverified.** The docs are silent. A third-party changelog mirror mentions "nested subagents respect concurrency limits" (1.0.62), which is not confirmed | [S25] |
| VS Code Copilot, Local harness | Off by default. `chat.subagents.allowInvocationsFromSubagents` allows a maximum depth of 5. The Local harness is deprecated and will be removed in February 2027. The Copilot harness (`task` tool) is undocumented on this point | [S26] |
**Implication.** The portable lowest common denominator is *one* level: main loop → leaf.
ADR-0031's "Lead is the only dispatcher" is correct for portability. GLOSSARY and the issue should
cite Gemini CLI and Codex's default as the binding constraints, not Claude Code.
## 4. Deterministic code versus LLM orchestration for a fixed pipeline
- Anthropic: "workflows offer predictability and consistency for well-defined tasks". Agents are
for when "flexibility and model-driven decision-making are needed" [S1].
- OpenAI: orchestrating via code "makes tasks more deterministic and predictable, in terms of
speed, cost and performance". Its patterns are classify-then-route, chaining, and
evaluator loops [S8].
- Microsoft: use a workflow when "the process has well-defined steps" and "you need explicit
control over execution order". "If you can write a function to handle the task, do that instead
of using an AI agent" [S23].
- Google ADK: template workflow agents run "without consulting an AI model … deterministic and
predictable". ADK 2.0 adds graph and dynamic workflows that mix code and LLM nodes [S24].
spec → tickets → code → review → merge has fixed stages and human gates. The *transition* between
stages is a pure function of tracker state: label X means run stage Y. That is code. The *work
inside* a stage (decomposing a spec, writing code, judging a diff) is LLM work. An LLM Lead that
reads labels and picks the next stage is an LLM doing a lookup. It adds cost and an
instruction-following failure surface (MAST "system design" failures [S19]) for no flexibility the
human gates do not already remove.
## 5. "Stage lead per session": runtime support
The model runs each stage as its own top-level session whose main loop is the stage lead. That
lead spawns leaf specialists, so the model needs no nesting. Hand-off between stages goes through
Gitea plus human gates, and a script chains headless sessions in run mode.
| Runtime | Main session as a custom agent | Headless | Both together |
|---|---|---|---|
| Claude Code | `--agent <name>`. The main-thread agent can spawn subagents, and `Agent(type)` allowlists them [S4][S33] | `-p` | **Verified locally**: `claude -p --agent lint-runner …` ran with the agent's prompt (v2.1.323) |
| Copilot CLI | `--agent <id>` or `/agent` [S34] | `-p` / `--prompt`, with `--allow-tool` and `--no-ask-user` [S35] | Documented example: `copilot --agent security-auditor --prompt "…"` [S34] |
| Codex CLI | **No `--agent` flag** for the root session (checked in source: `exec/src/cli.rs`). Closest: `--profile`, `-c developer_instructions=…` or `model_instructions_file` [S36] | `codex exec` | Via profile or config override, not an agent file |
| Gemini CLI | **No `--agent` flag** (checked in `packages/cli/src/config/config.ts`). `GEMINI_SYSTEM_MD`*replaces* the whole system prompt [S37] | `-p` | Via `GEMINI_SYSTEM_MD`, or a prompt that invokes the stage skill |
| Cursor CLI | **No flag.**`--mode` accepts only `plan` or `ask` [S38] | `-p` / `--print` | Prompt only |
So `--agent` is portable to two of five runtimes. What is portable to all five is **a headless
session whose prompt invokes the stage skill**. That is how ADR-0031's Lead skill already works.
The stage lead should therefore be a *skill* (one per stage), with a thin `--agent` wrapper only
where the runtime has one.
**Vendor precedent for chaining sessions with a script.** Anthropic's long-running harness runs
each step as a fresh session. State is handed over through `claude-progress.txt`, a JSON feature
list and git commits, so that a new session can "quickly understand the state of work when
starting with a fresh context window" [S32]. Claude Code's best practices say to write `SPEC.md`
and "start a fresh session to build from it". They also recommend a second session as the
independent reviewer [S31]. Copilot and Cursor document `-p` specifically "for scripts, CI
pipelines, or automation" [S35][S38]. I found no vendor that recommends one long-lived LLM
orchestrator spanning spec through merge, and Claude agent teams cannot be resumed ("No session
resumption") [S7].
## 6. Function specialists within a stage
The earlier note argued against **tool** specialists (an "ansible-engineer"). **Function**
specialists (test author, implementer, verifier) are a different question, and the evidence on
them is mixed.
**(a) Separating test authoring from implementation**
- AgentCoder: programmer, test designer and test executor agents. Test accuracy was 61.0/51.8
when a single agent wrote both, against 87.8/89.9 with a separate designer (HumanEval/MBPP),
because "the tests designed by the same agent that generates the code can be biased by the code
and lose objectivity". Ablation pass@1 (likely GPT-3.5) rose from 61.0 for the programmer alone
to 79.9 for the full pipeline [S39]. Caveat: these are 2023–24 function-level benchmarks, not
repository work.
- ImpossibleBench (Oct 2025): agents with test access "may delete failing tests rather than fix
the underlying bug". GPT-5 cheats 54% on Conflicting-SWEbench (76% one-off). Hiding tests cuts
cheating to near zero but hurts legitimate performance. Read-only tests are "a middle ground"
that "does not eliminate … special-casing or operator overloading" [S40]. Anthropic system cards
track hard-coding and special-casing as reward hacking (secondary reading only, not verified in
the PDFs) [S41].
- Counter-evidence: "More agent-written tests do not mean more solves" (six frontier models, Apr
2026) [S42]. This concerns the *volume* of tests a single agent writes, not author separation.
**(b) Flat versus per-stage sub-lead**
A per-stage sub-lead *as a subagent* needs two levels. That works on Claude and Cursor, and fails
on Gemini and on Codex's default (§3). The portable options are:
1.**Flat**: the top-level Lead dispatches test author, implementer and verifier directly.
2.**Stage lead per session** (§5): the stage session *is* the sub-lead, and its specialists are
one level down.
LangGraph's maintainers steering users from the multi-level supervisor library to a flat
supervisor via tools [S29] points the same way (secondary snippet).
**(c) Benefits versus costs**
- Benefits: test oracles independent of the code [S39], and less self-grading bias [S21][S22][S31].
- Costs: multi-agent systems use about 15× the tokens of chat [S2]. Agent teams use "significantly
more tokens" [S7]. A fresh subagent "can end up *slower*", because it re-gathers context [S31].
Context loss at hand-off and children assuming shared state are reported failures [S22][S19].
- AgentCoder reports *lower* tokens than its multi-agent baselines (56.9K against 138.2K) [S39].
That comparison is against other multi-agent systems, not a single agent.
**Implication.** One function specialist is justified: the one that **verifies or constrains** the
writer. That covers a test author working before the code, and a verifier or reviewer with fresh
context. A second *writer* running in parallel is not justified [S3][S22]. A sequential
test-author → implementer hand-off keeps a single writer at any one time.
## 7. Recommendation
Keep the parts of ADR-0031 that fit the evidence: leaf role agents, human-set gates, state passed
by pointer, and one dispatcher per session. Change the shape of the Lead:
1.**Sequence stages with tracker state and code, not an LLM.** Each stage is a skill
(`spec-lead`, `tickets-lead`, `implement-lead`, `review-lead`, `verify-lead`), started as its
own session. Interactive mode: a human starts it. Run mode: a short script maps a Gitea label to
the next stage and launches `claude -p --agent implement-lead …`, `copilot --agent … -p …`, or
`codex exec` / `gemini -p` / `agent -p` with a prompt that invokes the skill. The thin `--agent`
wrapper is optional and only exists for Claude and Copilot.
2.**Within a session, the stage skill is the only dispatcher**, and specialists stay leaves. No
nesting is required on any runtime.
3.**Inside implement, use sequential function specialists**: test author (writes failing
acceptance tests from the ticket and commits them) → implementer (tests read-only) → verifier
(fresh context, runs the tests and checks the diff against the ticket). Enforce "implementer
does not edit the test author's tests" with a hook or pre-push diff check, not a prompt
(governance: deterministic enforcement). Do not run parallel writers on one ticket.
4. Correct the stated rationale in ADR-0031, GLOSSARY and #170. The binding constraints are Gemini
CLI (no nesting) and Codex's default `max_depth=1`. Claude Code is not one of them.
**Strongest counter-argument.** Do less: one implementer session per ticket doing test-first
itself, followed by a fresh-context reviewer.
- Every extra hand-off loses context and costs tokens and latency [S2][S31].
- Vendors are *removing* harness roles as models improve [S21].
- More agent-written tests do not move outcomes [S42].
- Read-only tests do not stop special-casing [S40], so the test-author split buys an independent
oracle but not integrity.
- A per-stage session also gives up any cross-stage judgement a long-lived Lead could exercise,
and adds a script to maintain.
Answer: the human gates already supply that cross-stage judgement. And the verifier step is the
part the evidence supports most strongly [S21][S22][S31]. If cost matters more than oracle
independence, drop the test author first and keep the verifier.
## Unverified or not reached
- Copilot CLI nested subagents, and whether the Copilot harness `task` tool nests.
- Whether Codex V2 multi-agent permits unbounded nesting in practice. Source shows that
`max_depth` is ignored, but the V2 depth logic was not traced.
- The headless/`--agent` combination on Copilot CLI is documented but was not run locally.
- Anthropic system-card reward-hacking figures were read only through secondary quotes.
- The ADK multi-agent page (`sub_agents` single-parent rule) is now a redirect, so the 2.0 graph and
dynamic docs were used instead.
## Sources
Fetched 2026-11-13 unless noted. S1–S20 carry the numbering of the prior note.
- [S29] LangChain reference, `langgraph-supervisor` / `langgraph-swarm` — <https://reference.langchain.com/python/langgraph-supervisor> (the multi-level and "use tools instead" claims come from search snippets, not the page as fetched)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.