Skip to content

Fix the review step so a finished plan can complete and finished work isn't re-checked forever#5460

Open
andrescera wants to merge 2 commits into
code-yeongyu:devfrom
andrescera:fix/verification-gate-no-reloop
Open

Fix the review step so a finished plan can complete and finished work isn't re-checked forever#5460
andrescera wants to merge 2 commits into
code-yeongyu:devfrom
andrescera:fix/verification-gate-no-reloop

Conversation

@andrescera

@andrescera andrescera commented Jun 20, 2026

Copy link
Copy Markdown
Contributor

Fix the review step so a finished plan can complete and finished work isn't re-checked forever

The problem. After the assistant finishes a piece of work and hands it to a reviewer, two things went wrong. First, if a reviewer's reply didn't contain a clear approve-or-reject decision, the plan could get stuck permanently: it would never be considered finished, and the assistant would keep trying with no way out. Second, once a part of the plan was done, the assistant could fall back into re-checking that same finished work again and again, repeating the same review instead of moving on to what was left.

When it started. The strict approve check was introduced in v3.12.0 (commit 04b0c6f); the repeated re-checking of completed work comes from the completion-enforcement behavior added in v3.11.0 (commit bf8d0ff) and extended in v3.14.1 (commit 6e700e0).

The solution. When a reviewer doesn't give a clear decision, the assistant now pauses and asks you to confirm or re-run the review, instead of silently looping forever. And once a piece of work is verified and marked done, the assistant no longer re-reviews it - it moves on to the next unfinished part, or wraps up if nothing is left.


Summary by cubic

Stops infinite review loops and prevents re-verifying finished work so plans can complete. Pauses on unclear final-review verdicts and guides you to confirm or re-run the review.

  • Bug Fixes
    • Final-review outputs are now classified as approve/reject/missing; on missing, we set waitingForFinalWaveApproval, show a toast, and send a short escalation with steps to confirm or re-run.
    • Once a task is verified, we skip the heavy 4-phase gate and emit a lightweight advance directive to move to the next unchecked task; verifiedTaskKeys tracks this and resets on plan change (also used for background_output retrievals).
    • Final-wave task detection uses plan state; exported classifyFinalWaveVerdict() for reuse and to avoid false re-drives.
    • Added tests for verdict classification and reminder builders.

Written for commit f7aa7d3. Summary will update on new commits.

Review in cubic

Add REJECT_VERDICT_PATTERN and export classifyFinalWaveVerdict() returning
'approve' | 'reject' | 'missing'. Keeps shouldPauseForFinalWaveApproval
semantics for the approve path. Exposes the classification so T12 can
escalate on 'missing' instead of looping forever.

Add buildMissingVerdictEscalation() and buildAdvanceDirective() builders
to verification-reminders.ts. The escalation message names the task and
says the boulder is paused; the advance directive is short and does not
contain 4-phase content.
… tasks

(C) When a final-review task completes with no clear verdict, set
waitingForFinalWaveApproval=true (stops idle-event auto-re-drive) and
emit buildMissingVerdictEscalation() toast + system reminder. Fire-and-
stop, not await.

(D) Add verifiedTaskKeys: Set<string> to SessionState. Before emitting
the heavy 4-phase completion gate, check if the task is already checked
or already in verifiedTaskKeys; if so, emit buildAdvanceDirective()
instead. Clear verifiedTaskKeys on plan change.

Also route background_output retrievals of already-handled tasks to the
lightweight path (no 4-phase reminder for result retrievals).
@github-actions github-actions Bot added the opencode OpenCode edition: packages/omo-opencode label Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

opencode OpenCode edition: packages/omo-opencode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant