Skip to content

Supervisor pre_merge checkpoint loops and blocks merge train #3

@nigel-dev

Description

@nigel-dev

Description

In supervisor mode, mc_plan can get stuck in a pre_merge checkpoint loop where jobs stay ready_to_merge and never progress to merging.

Steps to Reproduce

  1. Start a plan in supervisor mode (for example, mc_plan(..., mode: "supervisor")) with at least one job that reaches ready_to_merge.
  2. Run mc_plan_status and confirm the plan pauses at checkpoint pre_merge.
  3. Approve the checkpoint with mc_plan_approve(checkpoint: "pre_merge").
  4. Run mc_plan_status again.
  5. Repeat step 3 and observe that the plan pauses at pre_merge again with no merge progress.

Expected Behavior

After approving pre_merge, the next eligible ready_to_merge job should move to merging, be processed by the merge train, and continue normal plan execution.

Actual Behavior

  • Plan re-enters checkpoint pre_merge.
  • Job remains ready_to_merge.
  • Merge train does not enqueue/process the job.
  • Plan cannot progress without manual state edits or changing mode.

Environment

  • OS: macOS (darwin)
  • tmux version: 3.6a
  • opencode version: 1.1.56
  • bun version: 1.3.6

Additional Context

Likely in reconcile logic around src/lib/orchestrator.ts: in supervisor mode, ready_to_merge calls setCheckpoint("pre_merge") and returns, but there is no persisted per-job approval state to consume after mc_plan_approve, so the same job triggers checkpoint again on resume.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P0: criticalMust fix immediately — blocks core functionalitybugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions