Bug: /feature flow dispatches code-analyzer and architect in parallel; should be sequential #3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
When
/featureis invoked, the orchestrator (workspace/opencode/agents/orchestrator.md) dispatchescode-analyzer(step 5) andarchitect(step 6) in parallel, in the same turn, without sharing context. This violates the architect's input contract (workspace/opencode/agents/architect.mdline 31):An optional prior report from code-analyzer.Reproduction
/feature <description>with any feature description.code-analyzerandarchitectare dispatched in the same assistant turn withTask(...)calls in parallel.Expected
code-analyzerruns first; its output is appended to thearchitectprompt as input. Thenarchitectruns.Where the bug is
Two contributing factors:
agents/orchestrator.mdsteps 5-6 (lines 83-84) are listed as a numbered sequence with no explicit dependency language:The orchestrator can reasonably interpret numbered list items as parallelizable.
agents/orchestrator.md§"Universal rules" rule 3 (line 37) only mandates "in parallel" for reviewers:agents/architect.mdline 31 declaresAn optional prior report from code-analyzeras an input — but the orchestrator treated this dependency as ignorable. Either the orchestrator should have dispatched sequentially and passed the report, or architect's body should not have advertised the optional input if it isn't actually plumbed through.Suggested fix
Either:
architectwith that report as input."I recommend C: (B) generalizes to other flows.
/bugfixhas a similar pattern at step 5:code-analyzer + architect collaborate to isolate the actual cause— vague about whether the dispatch is sequential./code-reviewand/deep-analyzehave the same shape (analyzer, then architect). All four flows need the same plumbing.Evidence from this run
Branch
feat/spec-installer(in progress, not yet pushed). The orchestrator's task trace for/feature spec_installer.mdshowed twoTask(...)dispatches in the same assistant turn:Task(subagent_type="code-analyzer", description="Analyze bundle for installer feature")Task(subagent_type="architect", description="Architect installer feature plan")Both fired in the same response. The user intervened to cancel the code-analyzer task and asked for this issue. This has come up more than once in past sessions — the user's words were "No es la primera vez que te lo explico."
Severity
Medium — wrong-order dispatch means the architect's plan may be uninformed by the analyzer's findings (current bundle structure, complexity, duplications, smells). The architect falls back to reading the code itself when no report is provided, which works but is wasteful and may miss things. Worst case: a plan that proposes changes incompatible with existing patterns the analyzer would have flagged.