Skip to content

Route transcript Retry turn to the failed workflow slot #830

Closed

Description

@currentbits

Goal

After a failed or stopped Build, transcript Retry turn still calls runs.start (a chat turn). #828 hid that button because #825 was not in tree. Now route the same control to the failed-slot path: runs.retryWorkflowAgent on the failed phase agent.

Do not call runs.start or runs.startWorkflow (full pipeline restart). Do not invent persist/resume (#815) or crash-resume (#182). Kimi flags unchanged.

Slot pick

Agents-panel Retry is per-slot: agent.status === "failed" and thread.status !== "working". The transcript has one button. When several slots failed, pick the first failed agent in panel order (phases, then agents in each phase). That is the first Retry the Agents panel would show. Do not add a second full-pipeline restart.

Hide Retry turn only when the last event belongs to the current workflow (last.runId === workflow.id) and there is no failed slot to route to. A leftover workflow view after a later chat failure still uses runs.start (run ids differ).

Tests first

  • Pure: first failed agent in phase-then-agent order; skip settled; null while working; null when none failed
  • Pure: still anchors Retry turn when last event is this Build and a failed slot exists
  • Pure: hide when last event is this Build but no failed slot
  • Wiring: failed/stopped workflow last-run shows Retry turn; click calls runs.retryWorkflowAgent with that agent id; does not call runs.start / runs.startWorkflow
  • Wiring: several failed slots → first in panel order
  • Wiring: leftover workflow + later failed chat still calls runs.start

Out of scope

Activity

  1. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Implemented in worktree coder/fork-fork-fork-fork-fork-fork-fork-kimi--bdcaf5 (uncommitted).

    Retry turn on a Build last-run now calls runs.retryWorkflowAgent for the first failed slot in Agents-panel order. Leftover workflow + later chat failure still uses runs.start. No startWorkflow. Watched RED (click still hit runs.start); 33/33 retry tests green.

    This tree has the IPC/useCoder surface. electron/workflow.js still has no engine — runner throws until #825 lands.

  2. added
    plan:done
    plan:doing
    and removed
    plan:doing
    plan:done
    on Sep 2, 2026
  3. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Implemented in worktree coder/fork-fork-fork-fork-fork-fork-fork-fork--53ca43 (uncommitted).

    Retry turn on a Build last-run now calls runs.retryWorkflowAgent for the first failed slot in Agents-panel order. Hide only when last.runId === workflow.id and no slot failed. Leftover workflow + later chat failure still uses runs.start. No startWorkflow.

    Watched RED (click still hit runs.start); 33/33 retry tests green. Typecheck and IPC seam pass.

    This tree has the IPC/useCoder surface. electron/workflow.js still has no engine — runner throws until #825 lands.

  4. added
    plan:done
    and removed
    plan:doing
    on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions