Skip to content

Hide transcript Retry turn after a failed or stopped Build workflow #828

Closed

Description

@currentbits

Goal

After a failed or stopped Build workflow, ThreadView still shows Retry turn on the last event (src/retryTurn.ts). Clicking it re-sends the last user message via runs.start (a single interactive chat turn), not a workflow recovery.

That is the wrong recovery for a Build: it starts a normal chat turn on the thread provider instead of re-running the failed phase slot.

Approach

Hide Retry turn when ThreadDetail.workflow is present and the last transcript message belongs to that workflow (message.runId === workflow.id; the public view id is the workflow runId).

A leftover workflow view after a later interactive turn must still show Retry turn (run ids differ).

Do not route this button to runs.startWorkflow (full restart) or invent persist/resume (#815) / crash-resume (#182). Agents-panel per-slot Retry stays #825. Kimi flags unchanged.

Tests first

  • Pure: retryAnchorEventId is null when last event runId matches workflow.id
  • Pure: still anchors when leftover workflow id does not match the last message
  • Wiring: failed/stopped workflow last-run does not render Retry turn and does not call runs.start / runs.startWorkflow
  • Wiring: leftover workflow + later failed chat turn still renders Retry turn

Out of scope

Activity

  1. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Implemented in this worktree (not committed).

    Hide, not route: when the last transcript message belongs to the current Build (last.runId === workflow.id), retryAnchorEventId returns null so ThreadView does not offer Retry turn. That button would have called runs.start (a chat turn).

    A leftover lastWorkflowByThread after a later interactive failure still shows Retry turn (ids differ).

    Did not call runs.startWorkflow (full restart) or invent persist/resume (#815) / crash-resume (#182). Agents-panel per-slot Retry stays #825. Kimi flags unchanged.

    Tests: test/retryTurn.test.ts + test/retryTurnWiring.test.tsx — 27/27.

  2. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Superseded for the transcript button by #830: route to retryWorkflowAgent instead of hiding. Hide remains only when this Build is last and no failed slot exists.

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

    @currentbits
    OwnerAuthor

    Landed from Solenta thread "Fork: Fork: Fork: Fork: Fork: Fork: Fork: Kimi workflow phas". Closed on merge.

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