From 0c7250922c52841319020f60e8e47b1f6afc12e0 Mon Sep 17 00:00:00 2001 From: Stephen Benjamin Date: Sun, 26 Jul 2026 15:15:03 -0400 Subject: [PATCH] Await specialist sub-agents so the panel actually posts a verdict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The parallel dispatch added in #458 launches the six specialists with `run_in_background: true`. A background agent returns immediately, so the dispatching turn ends with every review still running. Interactively that is fine — the notifications arrive and work resumes. Headlessly it is not: when the turn ends, the CI job ends. Observed on PR #451 (run 30216174198). The job exited `success` after 3m22s having posted nothing. Its final message was "I'll synthesize the verdict and post it as a single PR comment once all six report back" — the six had been dispatched moments earlier and none had returned. From outside the workflow this is indistinguishable from a clean review: a green check and no findings. Dispatch synchronously instead — `run_in_background: false`, still all in one message. The single message is what makes them concurrent; the synchronous flag is what makes the call block until all six return. The parallelism #458 wanted is preserved; only the fire-and-forget goes. Also state in the Completeness Gate that the run must never end there. A panel that stops after dispatching produces nothing actionable and looks identical to a clean pass, so a partial verdict naming the failed specialists beats silence. Co-Authored-By: Claude Opus 5 (1M context) --- .agents/skills/skillsaw-review-panel/SKILL.md | 22 ++++++++++++++++--- .apm/skills/skillsaw-review-panel/SKILL.md | 22 ++++++++++++++++--- .claude/skills/skillsaw-review-panel/SKILL.md | 22 ++++++++++++++++--- .skillsaw-card.svg | 2 +- 4 files changed, 58 insertions(+), 10 deletions(-) diff --git a/.agents/skills/skillsaw-review-panel/SKILL.md b/.agents/skills/skillsaw-review-panel/SKILL.md index 95715272..4c026d52 100644 --- a/.agents/skills/skillsaw-review-panel/SKILL.md +++ b/.agents/skills/skillsaw-review-panel/SKILL.md @@ -127,7 +127,17 @@ may not share the skill's working directory. #### Parallel mode (default) Launch **all 6 specialist sub-agents in a single message** so they -run concurrently, using the Agent tool with `run_in_background: true`. +run concurrently, using the Agent tool with `run_in_background: false`. + +Both halves of that matter. A single message is what makes them run +concurrently. `run_in_background: false` is what makes the dispatch +*block* until every one returns. + +Do **not** use `run_in_background: true` here. A background agent +returns immediately, so the dispatching turn ends with the reviews +still running — and when the panel runs headlessly in CI, the turn +ending ends the job. The workflow then exits green having posted no +verdict at all, which is worse than failing loudly. Each sub-agent gets: - The specialist role name and a one-line description of its lens @@ -153,8 +163,9 @@ If the Agent tool is not available (e.g. running in Codex or another client that lacks sub-agent support), fall back to serial mode automatically. -Wait for all sub-agents to complete before proceeding to the -Completeness Gate (Step 4). +Synchronous dispatch means all six have returned by the time the +tool call completes. Proceed to the Completeness Gate (Step 4) only +with six sets of findings in hand. #### Serial mode (`--serial`) @@ -184,6 +195,11 @@ retry it. If any specialist returned an error or a missing/malformed result, re-dispatch it **once**. If the retry also fails, record the failure and proceed. +Never end the run here. A panel that stops after dispatching has +produced nothing a reviewer can act on, and it looks identical to a +clean review from the outside. If specialists are missing and cannot +be recovered, post the verdict anyway, naming which ones failed. + ### Step 5 — Run Panel Arbiter Synthesis After all specialists complete, review and synthesize directly: diff --git a/.apm/skills/skillsaw-review-panel/SKILL.md b/.apm/skills/skillsaw-review-panel/SKILL.md index 95715272..4c026d52 100644 --- a/.apm/skills/skillsaw-review-panel/SKILL.md +++ b/.apm/skills/skillsaw-review-panel/SKILL.md @@ -127,7 +127,17 @@ may not share the skill's working directory. #### Parallel mode (default) Launch **all 6 specialist sub-agents in a single message** so they -run concurrently, using the Agent tool with `run_in_background: true`. +run concurrently, using the Agent tool with `run_in_background: false`. + +Both halves of that matter. A single message is what makes them run +concurrently. `run_in_background: false` is what makes the dispatch +*block* until every one returns. + +Do **not** use `run_in_background: true` here. A background agent +returns immediately, so the dispatching turn ends with the reviews +still running — and when the panel runs headlessly in CI, the turn +ending ends the job. The workflow then exits green having posted no +verdict at all, which is worse than failing loudly. Each sub-agent gets: - The specialist role name and a one-line description of its lens @@ -153,8 +163,9 @@ If the Agent tool is not available (e.g. running in Codex or another client that lacks sub-agent support), fall back to serial mode automatically. -Wait for all sub-agents to complete before proceeding to the -Completeness Gate (Step 4). +Synchronous dispatch means all six have returned by the time the +tool call completes. Proceed to the Completeness Gate (Step 4) only +with six sets of findings in hand. #### Serial mode (`--serial`) @@ -184,6 +195,11 @@ retry it. If any specialist returned an error or a missing/malformed result, re-dispatch it **once**. If the retry also fails, record the failure and proceed. +Never end the run here. A panel that stops after dispatching has +produced nothing a reviewer can act on, and it looks identical to a +clean review from the outside. If specialists are missing and cannot +be recovered, post the verdict anyway, naming which ones failed. + ### Step 5 — Run Panel Arbiter Synthesis After all specialists complete, review and synthesize directly: diff --git a/.claude/skills/skillsaw-review-panel/SKILL.md b/.claude/skills/skillsaw-review-panel/SKILL.md index 95715272..4c026d52 100644 --- a/.claude/skills/skillsaw-review-panel/SKILL.md +++ b/.claude/skills/skillsaw-review-panel/SKILL.md @@ -127,7 +127,17 @@ may not share the skill's working directory. #### Parallel mode (default) Launch **all 6 specialist sub-agents in a single message** so they -run concurrently, using the Agent tool with `run_in_background: true`. +run concurrently, using the Agent tool with `run_in_background: false`. + +Both halves of that matter. A single message is what makes them run +concurrently. `run_in_background: false` is what makes the dispatch +*block* until every one returns. + +Do **not** use `run_in_background: true` here. A background agent +returns immediately, so the dispatching turn ends with the reviews +still running — and when the panel runs headlessly in CI, the turn +ending ends the job. The workflow then exits green having posted no +verdict at all, which is worse than failing loudly. Each sub-agent gets: - The specialist role name and a one-line description of its lens @@ -153,8 +163,9 @@ If the Agent tool is not available (e.g. running in Codex or another client that lacks sub-agent support), fall back to serial mode automatically. -Wait for all sub-agents to complete before proceeding to the -Completeness Gate (Step 4). +Synchronous dispatch means all six have returned by the time the +tool call completes. Proceed to the Completeness Gate (Step 4) only +with six sets of findings in hand. #### Serial mode (`--serial`) @@ -184,6 +195,11 @@ retry it. If any specialist returned an error or a missing/malformed result, re-dispatch it **once**. If the retry also fails, record the failure and proceed. +Never end the run here. A panel that stops after dispatching has +produced nothing a reviewer can act on, and it looks identical to a +clean review from the outside. If specialists are missing and cannot +be recovered, post the verdict anyway, naming which ones failed. + ### Step 5 — Run Panel Arbiter Synthesis After all specialists complete, review and synthesize directly: diff --git a/.skillsaw-card.svg b/.skillsaw-card.svg index c29178dd..9a52af0e 100644 --- a/.skillsaw-card.svg +++ b/.skillsaw-card.svg @@ -17,7 +17,7 @@ skillsaw report card Violation density0.21 per 10k tokens - Content tokens~28,908 + Content tokens~29,118 Building blocks1 plugin · 11 skills Top rules 1. content-actionability-score (4)