From e772c42d00313c6f0b1d7d94c7f49667176c6d53 Mon Sep 17 00:00:00 2001 From: PinkyD Date: Thu, 2 Jul 2026 22:55:26 -0700 Subject: [PATCH] fix(dev-auto): require synchronous subagent invocation (#2543) The dev-auto workflow runs unattended with no event loop to resume a yielded turn. If a subagent is launched detached/backgrounded (e.g. run_in_background: true) or the turn ends to await a completion notification, control is never handed back and the run stalls. Make the contract explicit: invoke every subagent synchronously and await it within the same turn. Clarify that 'in parallel' means several blocking calls awaited together, not detached execution. The only sanctioned way to end a turn remains the HALT protocol with a terminal status. Co-authored-by: Claude Opus 4.8 (1M context) --- src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md | 2 ++ .../4-implementation/bmad-dev-auto/step-03-implement.md | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md b/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md index 2ba37d685..2b4e71168 100644 --- a/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md +++ b/src/bmm-skills/4-implementation/bmad-dev-auto/SKILL.md @@ -33,6 +33,8 @@ To HALT with a final status and optional blocking condition: Using subagents when instructed is mandatory. If you cannot, HALT with status `blocked` and blocking condition `no subagents`. +Invoke every subagent **synchronously**: launch it, wait for it to return within the same turn, then continue with its result. When a step says to run subagents "in parallel" (e.g. the reviewers), that means several **blocking** calls awaited together in one turn — not detached execution. Never run a subagent in the background / detached / async (e.g. `run_in_background: true`), and never end your turn to "await a completion notification." This workflow runs unattended: there is no event loop to resume a yielded turn, so a backgrounded subagent never hands control back and the run stalls. The only sanctioned way to end a turn is the HALT protocol above with an explicit terminal `status`. + ## READY FOR DEVELOPMENT STANDARD A specification is "Ready for Development" when: diff --git a/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md b/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md index 504998487..d235441fe 100644 --- a/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md +++ b/src/bmm-skills/4-implementation/bmad-dev-auto/step-03-implement.md @@ -25,7 +25,7 @@ Change `{spec_file}` status to `in-progress` in the frontmatter before starting If `{spec_file}` has a non-empty `context:` list in its frontmatter, load those files before implementation begins. When handing to a subagent, include them in the subagent prompt so it has access to the referenced context. -Hand `{spec_file}` to an implementation subagent. +Hand `{spec_file}` to an implementation subagent. Invoke it **synchronously** and wait for it to return in this same turn — do not background/detach it (`run_in_background`) or end your turn to await a notification (see SKILL.md → Subagents). Resume at "Tasks & Acceptance Verification" only after it returns. **Path formatting rule:** Any markdown links written into `{spec_file}` must use paths relative to `{spec_file}`'s directory so they are clickable in VS Code. Any file paths displayed in terminal/conversation output must use CWD-relative format with `:line` notation (e.g., `src/path/file.ts:42`) for terminal clickability. No leading `/` in either case.