Skip to content

Kimi workflow phases cannot resume #782

Closed

Description

@currentbits

Noted on GitHub #699 and left as a design: kimi workflow agents are always headless one-shots with sessionId: null (electron/workflow.js spawnAgentKimi buildArgs). kimi DOES support per-session resume via -S from the stream meta resume hint (see electron/providers.js kimi buildArgs and electron/kimi.js extractSessionId). Regular runner turns persist sessionId on the thread.

Decide whether a workflow kimi phase should persist and resume its session across retries or follow-up agents in the same phase. If yes: capture extractSessionId from the phase child, store it on the workflow agent (not the parent thread sessionId — that would collide with a later interactive turn), and pass it back on retry. Tests should prove -S is emitted only when a real session id exists, never -c (issue #220).

This is out of scope for #699 (effort + MCP overlay).

Filed from a Solenta suggested-work chip.

Activity

  1. added
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Aug 29, 2026
  2. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Decision: yes, persist and resume on the workflow agent slot.

    • Capture extractSessionId from the phase child and store it on that agent (agent.sessionId).
    • Pass it back as -S <id> on a later spawn of the same slot (retry / follow-up of that agent).
    • Do not write it to thread.sessionId — a later interactive turn would collide.
    • Sibling agents in the same phase stay isolated (each has its own overlayKey).
    • -S only when a real session id exists; never -c (Kimi threads started from the planboard do not know the task #220). The leftover cwd sentinel is treated as no session.

    Implemented on coder/kimi-workflow-phases-cannot-resume-01cc89. Tests in electron/test/workflow-kimi-resume.test.js.

  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 "Kimi workflow phases cannot resume". 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