Skip to content

fix: devloop continue misrouted as NL task; gate timeouts leave no recovery path#10

Merged
shaifulshabuj merged 2 commits into
mainfrom
copilot/fix-devloop-continue-misrouting
May 16, 2026
Merged

fix: devloop continue misrouted as NL task; gate timeouts leave no recovery path#10
shaifulshabuj merged 2 commits into
mainfrom
copilot/fix-devloop-continue-misrouting

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 16, 2026

devloop continue TASK-ID was treated as natural language, spawning a new architect phase on top of an already-completed worker and opening a duplicate Live View pane. Gate timeouts also dropped users to a bare prompt with no recovery guidance.

Changes

Command dispatcher

  • Added continue as alias for resumedevloop continue TASK-ID now routes to cmd_resume

NL router TASK-ID guard

  • Unknown commands are now scanned for TASK-[0-9]{8}-[0-9]{6} args before NL routing fires
  • On match: prints devloop resume <id> / devloop status <id> hints and exits cleanly — no architect spawn, no duplicate pane

Gate rejection recovery hints

  • _approval_gate() timeout path now prints devloop resume $DEVLOOP_CURRENT_SESSION_ID when a session ID is in scope
  • All plan/diff rejection exits in cmd_run and cmd_resume print the same targeted hint

cmd_resume now handles gate-rejected sessions

  • rejected-at-plan and rejected-at-diff removed from the terminal-status early-exit; only approved and rejected (reviewer verdict) are treated as non-resumable
  • Resuming a rejected-at-plan session re-runs the plan gate → worker → diff gate (existing _compute_resume_from logic already returns worker for this case)
  • Resuming a rejected-at-diff session re-runs the diff gate via a new _resume_diff_gate flag set when cur_status == rejected-at-diff && next_phase == reviewer, triggering the full diff-gate loop before entering the reviewer
# Before: misrouted
$ devloop continue TASK-20260517-001721
Unknown command — interpreting as natural language task
[1] Architecting...  ← wrong, spawns new pipeline

# After: correct
$ devloop continue TASK-20260517-001721
▶ Resuming TASK-20260517-001721
  From: worker   Next: diff gate

Copilot AI changed the title [WIP] Fix devloop continue misrouted as NL task after gate timeout fix: devloop continue misrouted as NL task; gate timeouts leave no recovery path May 16, 2026
Copilot AI requested a review from shaifulshabuj May 16, 2026 16:35
Copilot AI and others added 2 commits May 17, 2026 01:36
…ia devloop resume

- Remove rejected-at-* from terminal status in --list, auto-find, and already-complete check
- Add rejected-at-diff to diff-gate override (re-presents gate without re-running worker)
- Add informational hint when resuming a rejected-at-plan session
- Update help text: rejected-at-plan and rejected-at-diff now listed as resumable statuses
- Only approved and reviewer-rejected (rejected) are now truly terminal

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shaifulshabuj shaifulshabuj force-pushed the copilot/fix-devloop-continue-misrouting branch from 694cf30 to 8459739 Compare May 16, 2026 16:38
@shaifulshabuj shaifulshabuj marked this pull request as ready for review May 16, 2026 16:38
Copilot AI review requested due to automatic review settings May 16, 2026 16:38
Copy link
Copy Markdown
Owner

@shaifulshabuj shaifulshabuj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementation is clean: rejected-at-plan and rejected-at-diff are now resumable. The diff-gate override for rejected-at-diff correctly re-presents only the gate without re-running the worker. Terminal states are now only approved and reviewer-rejected. Approving.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Allows devloop resume to recover sessions previously stuck in rejected-at-plan / rejected-at-diff states (which were treated as terminal). Previously these statuses fell through rejected-at-* glob filters and were skipped; now only reviewer-rejected (rejected) and approved are treated as truly terminal. The diff-gate override is extended so resuming a rejected-at-diff session re-presents only the diff gate without re-running the worker.

Changes:

  • Narrow terminal-status filters in --list, newest-session selection, and the early-exit guard from approved|rejected|rejected-at-* to just approved|rejected.
  • Extend the existing timed-out-at-diff override to also handle rejected-at-diff, setting next_phase=diff-gate.
  • Print an informational hint when resuming a rejected-at-plan session and update the --help text to list the newly resumable statuses.

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.

devloop continue misrouted as NL task after gate timeout — spawns duplicate architect + Live View

3 participants