reactive-execute prompt
The reactive-execute prompt drives parallel task execution within a slice. When the task dependency graph shows multiple tasks with no mutual dependencies, this prompt dispatches them simultaneously as subagents instead of running them sequentially.
When It Runs
Section titled “When It Runs”Reactive execution is triggered during auto-mode when the dispatch engine detects two or more tasks in a slice that are ready for execution at the same time (their input dependencies are already satisfied). You don’t invoke it directly.
What It Does
Section titled “What It Does”- Analyses the task dependency graph to identify which tasks can run in parallel
- Dispatches all ready tasks simultaneously using the
subagenttool in parallel mode — each subagent gets a fullexecute-taskprompt - Waits for all subagents to complete
- Verifies outputs — checks that expected files were created, verification commands pass, and each task wrote its own
T##-SUMMARY.md - Preserves successful work — if one task fails, successful sibling tasks are kept as-is
Failure Handling
Section titled “Failure Handling”The prompt follows strict rules when a parallel task fails:
- Successful tasks are never rolled back — good work from sibling tasks is preserved exactly as it landed
- Failed tasks without summaries get a failure summary written by the parent agent via
gsd_save_summarywithblocker_discovered: true - Failed tasks are not marked complete — they remain uncompleted so replan/retry can pick them up
- No batch commits — the surrounding unit lifecycle owns commits, not this prompt
Variables
Section titled “Variables”| Variable | Description |
|---|---|
workingDirectory | Absolute path to the working directory |
milestoneId / milestoneTitle | Active milestone context |
sliceId / sliceTitle | Slice being executed |
graphContext | Task dependency graph showing relationships |
readyTaskCount | Number of tasks ready for parallel dispatch |
readyTaskList | Formatted list of ready tasks with descriptions |
subagentPrompts | Full execute-task prompts for each subagent |
inlinedTemplates | Any additional template content needed by subagents |
Related Prompts
Section titled “Related Prompts”- execute-task — the prompt each parallel subagent receives
- plan-slice — produces the task graph that determines parallelism
- replan-slice — triggered when a parallel task discovers a blocker