Bug Description
The /autoplan dual-voice feature instructs Claude to run the Agent tool (subagent) and Bash (Codex) simultaneously, with "All non-blocking" error handling. This causes every autoplan invocation to silently degrade to single-reviewer mode.
Root Cause
Two independent failure modes:
1. Permission Isolation (Critical)
Background subagents dispatched with run_in_background: true do NOT inherit the parent session's tool permissions. Both Read and Bash tools are denied. The subagent literally cannot read files or run commands — it's dead on arrival.
Tested output from background subagent:
```
status: completed
result: "I cannot complete this task. Both the Read and Bash tools have
been denied permission, preventing me from accessing the file..."
tool_uses: 2
duration_ms: 5898
```
2. Timing Race
Even if permissions worked, background task output arrives as a `` after the blocking Bash call returns. Claude has already moved on to present the consensus table, so subagent output is orphaned.
Tested foreground subagent (same prompt — works correctly):
```
Result: "SUBAGENT_COMPLETE: Line 198 specifies that dual voice reviews
(Claude subagent and Codex) must execute simultaneously..."
tool_uses: 1
duration_ms: 5857
```
Affected Lines
`autoplan/SKILL.md.tmpl` (source of truth):
- Line 198: `Run them simultaneously (Agent tool for subagent, Bash for Codex).`
- Line 220: `Error handling: All non-blocking.`
- Line 241: `Step 0.5 (Dual Voices): Run Claude subagent AND Codex simultaneously.`
- Line 341: `Step 0.5 (Dual Voices): Run Claude subagent AND Codex simultaneously.`
- Line 409: `Step 0.5 (Dual Voices): Run Claude subagent AND Codex simultaneously.`
Same text propagates to generated `autoplan/SKILL.md` at lines 541, 563, 584, 684, 752.
Reproduction
- Run `/autoplan` on any plan file
- Observe Claude launches a background Task and a Bash call in parallel
- Background Task fails with permission denied OR completes after Claude has moved on
- Consensus table shows N/A for the subagent voice
- Degradation matrix triggers "single-reviewer mode" silently
Impact
- Every `/autoplan` invocation degrades to single-reviewer mode
- The dual-voice feature (a key differentiator) never actually works
- No error is surfaced — the degradation matrix masks the systematic failure
- Users see the consensus table but subagent voice is always missing
Proposed Fix
Change "simultaneously" → sequential dispatch:
- Run Claude subagent via Agent tool in foreground (blocks, inherits permissions)
- Run Codex via Bash (blocks)
- Both outputs available → build real consensus table
Change "All non-blocking" → "Agent tool blocks in foreground; Codex blocks via Bash."
PR incoming: #fix/autoplan-subagent-parallelization
Environment
- Claude Code with Opus 4.6
- gstack v0.11.18.2
- macOS Darwin 25.3.0
Bug Description
The
/autoplandual-voice feature instructs Claude to run the Agent tool (subagent) and Bash (Codex) simultaneously, with "All non-blocking" error handling. This causes every autoplan invocation to silently degrade to single-reviewer mode.Root Cause
Two independent failure modes:
1. Permission Isolation (Critical)
Background subagents dispatched with
run_in_background: truedo NOT inherit the parent session's tool permissions. Both Read and Bash tools are denied. The subagent literally cannot read files or run commands — it's dead on arrival.Tested output from background subagent:
```
status: completed
result: "I cannot complete this task. Both the Read and Bash tools have
been denied permission, preventing me from accessing the file..."
tool_uses: 2
duration_ms: 5898
```
2. Timing Race
Even if permissions worked, background task output arrives as a `` after the blocking Bash call returns. Claude has already moved on to present the consensus table, so subagent output is orphaned.
Tested foreground subagent (same prompt — works correctly):
```
Result: "SUBAGENT_COMPLETE: Line 198 specifies that dual voice reviews
(Claude subagent and Codex) must execute simultaneously..."
tool_uses: 1
duration_ms: 5857
```
Affected Lines
`autoplan/SKILL.md.tmpl` (source of truth):
Same text propagates to generated `autoplan/SKILL.md` at lines 541, 563, 584, 684, 752.
Reproduction
Impact
Proposed Fix
Change "simultaneously" → sequential dispatch:
Change "All non-blocking" → "Agent tool blocks in foreground; Codex blocks via Bash."
PR incoming: #fix/autoplan-subagent-parallelization
Environment