branch-reconcile is the repo's second fan-out orchestrator — it spawns one sub-agent per in-flight branch, in parallel, and every branch it hands out is an issue-derived ref (claim/issue-<num>, cos/<task>/issue-<num>/<agent>). It is the same shape as the claim swarm's Phase B, but it dispatches all of its sub-agents at the coordinator's own default model and effort.
Issues carry model: / effort: dispatch labels that a planner chose after reading the code. The claim swarm now routes each fan-out agent by its own issue's labels (DISPATCH_HINT_FANOUT_GUIDANCE in server/lib/dispatchLabels.js, wired into resolveSwarmBlock in server/services/cosTaskPreStepBlocks.js). A reconcile batch containing one model:heavy redesign branch alongside four mechanical ones still routes all five identically.
Scope
- Carry the labels into the prompt.
formatInFlightForPrompt (server/services/branchReconcile.js) renders one block per branch (state, PR, worktree, drift, collision paths, Do:) and never fetches issue labels. Extract the issue number from the branch name with the same rule the claim flow uses — the claim/issue-<num> segment, or the issue-<num> third segment of cos/<task>/issue-<num>/<agent> — then read that issue's labels from the forge and add a per-branch line naming the recommended model: / effort: when either is present. Omit the line entirely when the branch is not issue-derived or the lookup fails; a failed label read must never block or reshape reconciliation.
- Add the routing contract to the prompt body. Interpolate
DISPATCH_HINT_FANOUT_GUIDANCE into the branch-reconcile prompt in server/services/taskPromptDefaults/prompts.js, next to the existing "Spawn ONE sub-agent per branch" instruction, and tell the coordinator to name the model/effort it used per branch in its summary — the same reporting requirement the swarm block carries.
- Ship the prompt change properly. A
prompts.js edit needs a PROMPT_VERSIONS bump plus the prior default preserved in PREVIOUS_DEFAULT_PROMPTS (server/services/taskPromptDefaults/), so installs whose stored prompt still matches the old default auto-upgrade.
Acceptance
- A branch derived from an issue labeled
model:heavy renders that recommendation in its block; an unlabeled or non-issue branch renders no extra line.
- A forge label lookup that fails leaves the reconcile prompt byte-identical to today's, minus the guidance block.
- The prompt carries
DISPATCH_HINT_FANOUT_GUIDANCE verbatim (imported, not retyped) so the reading vocabulary cannot drift from the writing vocabulary.
PROMPT_VERSIONS bumped and the previous default recorded; the prompt-drift suite passes.
Files
server/services/branchReconcile.js (formatInFlightForPrompt, ~line 1457)
server/services/taskPromptDefaults/prompts.js (branch-reconcile, the "Spawn ONE sub-agent per branch" line)
server/services/taskPromptDefaults/versions.js + previousDefaults.js
server/lib/dispatchLabels.js (consume DISPATCH_HINT_FANOUT_GUIDANCE; no change needed there)
branch-reconcileis the repo's second fan-out orchestrator — it spawns one sub-agent per in-flight branch, in parallel, and every branch it hands out is an issue-derived ref (claim/issue-<num>,cos/<task>/issue-<num>/<agent>). It is the same shape as the claim swarm's Phase B, but it dispatches all of its sub-agents at the coordinator's own default model and effort.Issues carry
model:/effort:dispatch labels that a planner chose after reading the code. The claim swarm now routes each fan-out agent by its own issue's labels (DISPATCH_HINT_FANOUT_GUIDANCEinserver/lib/dispatchLabels.js, wired intoresolveSwarmBlockinserver/services/cosTaskPreStepBlocks.js). A reconcile batch containing onemodel:heavyredesign branch alongside four mechanical ones still routes all five identically.Scope
formatInFlightForPrompt(server/services/branchReconcile.js) renders one block per branch (state, PR, worktree, drift, collision paths,Do:) and never fetches issue labels. Extract the issue number from the branch name with the same rule the claim flow uses — theclaim/issue-<num>segment, or theissue-<num>third segment ofcos/<task>/issue-<num>/<agent>— then read that issue's labels from the forge and add a per-branch line naming the recommendedmodel:/effort:when either is present. Omit the line entirely when the branch is not issue-derived or the lookup fails; a failed label read must never block or reshape reconciliation.DISPATCH_HINT_FANOUT_GUIDANCEinto thebranch-reconcileprompt inserver/services/taskPromptDefaults/prompts.js, next to the existing "Spawn ONE sub-agent per branch" instruction, and tell the coordinator to name the model/effort it used per branch in its summary — the same reporting requirement the swarm block carries.prompts.jsedit needs aPROMPT_VERSIONSbump plus the prior default preserved inPREVIOUS_DEFAULT_PROMPTS(server/services/taskPromptDefaults/), so installs whose stored prompt still matches the old default auto-upgrade.Acceptance
model:heavyrenders that recommendation in its block; an unlabeled or non-issue branch renders no extra line.DISPATCH_HINT_FANOUT_GUIDANCEverbatim (imported, not retyped) so the reading vocabulary cannot drift from the writing vocabulary.PROMPT_VERSIONSbumped and the previous default recorded; the prompt-drift suite passes.Files
server/services/branchReconcile.js(formatInFlightForPrompt, ~line 1457)server/services/taskPromptDefaults/prompts.js(branch-reconcile, the "Spawn ONE sub-agent per branch" line)server/services/taskPromptDefaults/versions.js+previousDefaults.jsserver/lib/dispatchLabels.js(consumeDISPATCH_HINT_FANOUT_GUIDANCE; no change needed there)