Skip to content

fix(workflow): prevent [ERROR] worker turns from silently skipping lead review#426

Closed
kokevidaurre wants to merge 1 commit intodevelopfrom
solve/issue-415
Closed

fix(workflow): prevent [ERROR] worker turns from silently skipping lead review#426
kokevidaurre wants to merge 1 commit intodevelopfrom
solve/issue-415

Conversation

@kokevidaurre
Copy link
Contributor

Summary

  • detectConvergence after step 3 (workers) checks only the last turn in the transcript. With parallel workers, a successful worker's convergence signal (e.g. "pr created") could cause an early return, silently discarding an [ERROR] result from another worker and skipping the lead review step entirely.
  • Fix: before calling detectConvergence after workers, check whether any worker turn in the current cycle starts with [ERROR]. If so, skip convergence and always proceed to lead review.
  • This is a minimal, targeted change — no refactoring of surrounding code.

Test plan

  • Build passes: npm run build
  • All tests pass: npm test
  • Manual: simulate parallel workers where one returns [ERROR] and another returns a convergence phrase — confirm lead review still runs

Fixes #415

🤖 Generated with Claude Code

…ad review

When workers run in parallel, detectConvergence checked only the last
turn after step 3. A successful worker could produce a convergence signal
that caused early return, silently discarding [ERROR] output from another
worker and skipping the lead review step entirely.

Guard: if any worker turn in the current cycle starts with [ERROR], skip
the post-worker convergence check so the lead always reviews errors.

Fixes #415

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kokevidaurre
Copy link
Contributor Author

Superseded by PR #424, which fixes #415, #417, and #419 together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant