Skip to content

Workflow phase agents should retry once on the same slot #815

Closed

Description

@currentbits

Decision

Yes: a failed workflow agent gets one bounded retry on the same slot.

  • Same overlayKey (the agent id)
  • Same agent.sessionId so the CLI resumes (--resume / exec resume / -s)
  • No new sibling agent
  • Never write to thread.sessionId
  • A second failure still fails the phase
  • Stop / cancel does not retry (guard())

#808 persist never landed in this tree, so this work also wires capture + pass-back for Claude (and Grok via claude-stream), Codex, OpenCode, and Cursor. Kimi flags stay unchanged (sessionId: null, no -S / -c).

Out of scope: crash-resume across process restart (#182), a user-facing retry button, changing kimi flags.

Steps

  • Failing tests: second spawn emits the provider resume flag; two failures fail the phase; one agent; thread.sessionId untouched
  • Persist extractSessionId on the workflow agent and forward it into buildArgs (leave kimi)
  • runOneAgent: one retry, same slot / overlay / sessionId
  • Prove a second failure still fails the phase

Activity

  1. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Yes — one bounded retry on the same slot.

    A failed workflow agent is re-spawned once with the same overlayKey and agent.sessionId. Never thread.sessionId. No sibling agent. Stop/cancel does not retry (guard()). A second failure still fails the phase.

    #808 persist was not in this tree, so capture + pass-back is included here for Claude (and Grok via claude-stream), Codex, OpenCode, and Cursor. Kimi flags stay sessionId: null (no -S / -c); kimi still retries on the same overlay.

    Resume flags on the second spawn (only with a real id):

    Verified: electron/test/workflow-phase-retry.test.js 9/9; related workflow suites 41/41. Nothing committed.

    Out of scope left as-is: crash-resume (#182), user-facing Retry button, changing kimi flags.

  2. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Same-slot retry landed on origin/main via #840 (spawnSlot + workflow-retry-agent tests).

  3. added
    plan:done
    and removed
    plan:doing
    on Sep 8, 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