fix: Add run_in_background=false to all agent Task invocations

Ensure all agent executions wait for results before proceeding.
Modified 20 workflow command files with 32 Task call updates.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
catlog22
2025-12-18 10:00:22 +08:00
parent ae07df612d
commit 4329bd8e80
20 changed files with 36 additions and 5 deletions

View File

@@ -81,6 +81,7 @@ ELSE:
**Framework-Based Analysis** (when guidance-specification.md exists):
```bash
Task(subagent_type="conceptual-planning-agent",
run_in_background=false,
prompt="Generate API designer analysis addressing topic framework
## Framework Integration Required
@@ -136,6 +137,7 @@ Task(subagent_type="conceptual-planning-agent",
# For existing analysis updates
IF update_mode = "incremental":
Task(subagent_type="conceptual-planning-agent",
run_in_background=false,
prompt="Update existing API designer analysis
## Current Analysis Context

View File

@@ -128,6 +128,7 @@ for (let i = 0; i < allQuestions.length; i += BATCH_SIZE) {
```javascript
Task(
subagent_type="context-search-agent",
run_in_background=false,
description="Gather project context for brainstorm",
prompt=`
Execute context-search-agent in BRAINSTORM MODE (Phase 1-2 only).

View File

@@ -81,6 +81,7 @@ ELSE:
**Framework-Based Analysis** (when guidance-specification.md exists):
```bash
Task(subagent_type="conceptual-planning-agent",
run_in_background=false,
prompt="Generate system architect analysis addressing topic framework
## Framework Integration Required
@@ -136,6 +137,7 @@ Task(subagent_type="conceptual-planning-agent",
# For existing analysis updates
IF update_mode = "incremental":
Task(subagent_type="conceptual-planning-agent",
run_in_background=false,
prompt="Update existing system architect analysis
## Current Analysis Context

View File

@@ -380,6 +380,7 @@ TodoWrite({
```bash
Task(subagent_type="{meta.agent}",
run_in_background=false,
prompt="Execute task: {task.title}
{[FLOW_CONTROL]}

View File

@@ -86,6 +86,7 @@ bash(cp .workflow/project.json .workflow/project.json.backup)
```javascript
Task(
subagent_type="cli-explore-agent",
run_in_background=false,
description="Deep project analysis",
prompt=`
Analyze project for workflow initialization and generate .workflow/project.json.

View File

@@ -333,6 +333,7 @@ Complete each task according to its "Done when" checklist.
Task(
subagent_type="code-developer",
run_in_background=false,
description=batch.taskSummary,
prompt=formatBatchPrompt({
tasks: batch.tasks,

View File

@@ -164,6 +164,7 @@ Launching ${selectedAngles.length} parallel diagnoses...
const diagnosisTasks = selectedAngles.map((angle, index) =>
Task(
subagent_type="cli-explore-agent",
run_in_background=false,
description=`Diagnose: ${angle}`,
prompt=`
## Task Objective
@@ -400,6 +401,7 @@ Write(`${sessionFolder}/fix-plan.json`, JSON.stringify(fixPlan, null, 2))
```javascript
Task(
subagent_type="cli-lite-planning-agent",
run_in_background=false,
description="Generate detailed fix plan",
prompt=`
Generate fix plan and write fix-plan.json.

View File

@@ -388,6 +388,7 @@ Write(`${sessionFolder}/plan.json`, JSON.stringify(plan, null, 2))
```javascript
Task(
subagent_type="cli-lite-planning-agent",
run_in_background=false,
description="Generate detailed implementation plan",
prompt=`
Generate implementation plan and write plan.json.
@@ -432,10 +433,11 @@ Generate plan.json following the schema obtained above. Key constraints:
## Execution
1. Read schema file (cat command above)
2. Read ALL exploration files for comprehensive context
3. Synthesize findings and generate plan following schema
4. Write JSON: Write('${sessionFolder}/plan.json', jsonContent)
5. Return brief completion summary
2. Execute CLI planning using Gemini (Qwen fallback)
3. Read ALL exploration files for comprehensive context
4. Synthesize findings and generate plan following schema
5. Write JSON: Write('${sessionFolder}/plan.json', jsonContent)
6. Return brief completion summary
`
)
```

View File

@@ -391,6 +391,7 @@ done
```javascript
Task(
subagent_type="cli-explore-agent",
run_in_background=false,
description=`Execute ${dimension} review analysis via Deep Scan`,
prompt=`
## Task Objective
@@ -476,6 +477,7 @@ Task(
```javascript
Task(
subagent_type="cli-explore-agent",
run_in_background=false,
description=`Deep-dive analysis for critical finding: ${findingTitle} via Dependency Map + Deep Scan`,
prompt=`
## Task Objective

View File

@@ -401,6 +401,7 @@ git log --since="${sessionCreatedAt}" --name-only --pretty=format: | sort -u
```javascript
Task(
subagent_type="cli-explore-agent",
run_in_background=false,
description=`Execute ${dimension} review analysis via Deep Scan`,
prompt=`
## Task Objective
@@ -487,6 +488,7 @@ Task(
```javascript
Task(
subagent_type="cli-explore-agent",
run_in_background=false,
description=`Deep-dive analysis for critical finding: ${findingTitle} via Dependency Map + Deep Scan`,
prompt=`
## Task Objective

View File

@@ -70,6 +70,7 @@ Invoke `universal-executor` agent to analyze session and prepare archive metadat
```
Task(
subagent_type="universal-executor",
run_in_background=false,
description="Analyze session for archival",
prompt=`
Analyze workflow session for archival preparation. Session is STILL in active location.

View File

@@ -221,6 +221,7 @@ return "conservative";
```javascript
Task(
subagent_type="cli-planning-agent",
run_in_background=false,
description=`Analyze test failures (iteration ${N}) - ${strategy} strategy`,
prompt=`
## Task Objective
@@ -271,6 +272,7 @@ Task(
```javascript
Task(
subagent_type="test-fix-agent",
run_in_background=false,
description=`Execute ${task.meta.type}: ${task.title}`,
prompt=`
## Task Objective

View File

@@ -108,7 +108,7 @@ Phase 4: Apply Modifications
**Agent Delegation**:
```javascript
Task(subagent_type="cli-execution-agent", prompt=`
Task(subagent_type="cli-execution-agent", run_in_background=false, prompt=`
## Context
- Session: {session_id}
- Risk: {conflict_risk}

View File

@@ -121,6 +121,7 @@ const sessionFolder = `.workflow/active/${session_id}/.process`;
const explorationTasks = selectedAngles.map((angle, index) =>
Task(
subagent_type="cli-explore-agent",
run_in_background=false,
description=`Explore: ${angle}`,
prompt=`
## Task Objective
@@ -215,6 +216,7 @@ Write(`${sessionFolder}/explorations-manifest.json`, JSON.stringify(explorationM
```javascript
Task(
subagent_type="context-search-agent",
run_in_background=false,
description="Gather comprehensive context for plan",
prompt=`
## Execution Mode

View File

@@ -218,6 +218,7 @@ const userConfig = {
```javascript
Task(
subagent_type="action-planning-agent",
run_in_background=false,
description="Generate planning documents (IMPL_PLAN.md, task JSONs, TODO_LIST.md)",
prompt=`
## TASK OBJECTIVE
@@ -344,6 +345,7 @@ Hard Constraints:
const planningTasks = modules.map(module =>
Task(
subagent_type="action-planning-agent",
run_in_background=false,
description=`Generate ${module.name} module task JSONs`,
prompt=`
## TASK OBJECTIVE
@@ -424,6 +426,7 @@ const moduleResults = await Promise.all(planningTasks);
// Launch +1 Coordinator Agent
Task(
subagent_type="action-planning-agent",
run_in_background=false,
description="Integrate module tasks and generate unified documents",
prompt=`
## TASK OBJECTIVE

View File

@@ -194,6 +194,7 @@ const templatePath = hasCliExecuteFlag
```javascript
Task(
subagent_type="action-planning-agent",
run_in_background=false,
description="Generate TDD task JSON and implementation plan",
prompt=`
## Execution Context

View File

@@ -76,6 +76,7 @@ Phase 3: Output Validation (Command)
```javascript
Task(
subagent_type="cli-execution-agent",
run_in_background=false,
description="Analyze test coverage gaps and generate test strategy",
prompt=`
## TASK OBJECTIVE

View File

@@ -86,6 +86,7 @@ if (file_exists(testContextPath)) {
```javascript
Task(
subagent_type="test-context-search-agent",
run_in_background=false,
description="Gather test coverage context",
prompt=`
You are executing as test-context-search-agent (.claude/agents/test-context-search-agent.md).

View File

@@ -94,6 +94,7 @@ Phase 2: Test Document Generation (Agent)
```javascript
Task(
subagent_type="action-planning-agent",
run_in_background=false,
description="Generate test planning documents (IMPL_PLAN.md, task JSONs, TODO_LIST.md)",
prompt=`
## TASK OBJECTIVE

View File

@@ -161,6 +161,7 @@ echo "[Phase 1] Starting parallel agent analysis (3 agents)"
```javascript
Task(subagent_type="ui-design-agent",
run_in_background=false,
prompt="[STYLE_TOKENS_EXTRACTION]
Extract visual design tokens from code files using code import extraction pattern.
@@ -276,6 +277,7 @@ Task(subagent_type="ui-design-agent",
```javascript
Task(subagent_type="ui-design-agent",
run_in_background=false,
prompt="[ANIMATION_TOKEN_GENERATION_TASK]
Extract animation tokens from code files using code import extraction pattern.
@@ -355,6 +357,7 @@ Task(subagent_type="ui-design-agent",
```javascript
Task(subagent_type="ui-design-agent",
run_in_background=false,
prompt="[LAYOUT_TEMPLATE_GENERATION_TASK]
Extract layout patterns from code files using code import extraction pattern.