Skip to content

Flows: opt-in per-node resume (skip completed nodes on re-run) #354

@superWorldSavior

Description

@superWorldSavior

Context

Claude Code's native Workflow tool supports deterministic resume: relaunch with resumeFromRunId, and the longest unchanged prefix of agent() calls returns cached results instantly — only edited/new calls (and everything downstream) run live. It's journaled per agent call.

acpx Flows already have most of the substrate for this:

  • run artifacts persist under ~/.acpx/flows/runs/<runId>/
  • runs are replayable for inspection (flow viewer)
  • checkpoint() provides human/external pause-resume
  • the runtime already owns persistence, retries, timeouts, routing

Gap

There's no way to re-run a flow and skip nodes that already completed. If a long flow (multi-step, 10–55 min) crashes near the end, or you edit a single downstream node, you re-run the whole graph.

Proposal

Opt-in, per-node memoization keyed on (node id + resolved input hash), persisted in the existing run dir. On acpx flow run --resume <runId> (name TBD): for each node whose key matches a completed record, short-circuit to the recorded outcome; the first changed/new node and everything downstream runs live.

The declared graph is what makes this clean — nodes have stable identities, unlike a dynamic/model-driven fan-out where "what changed" is a judgment, not a diff.

Important: must be opt-in / selective

Some nodes are nondeterministic by design and must stay fresh on every run — adversarial N-skeptic verify, loop-until-dry, "second opinion" passes. Memoization should be per-node (e.g. memoize: true, default off) so these are never cached. The value is in skipping deterministic labor, not in suppressing intentional re-sampling.

Prior art

Claude Code Workflow tool: resumeFromRunId + journaled agent-<id>.jsonl, "same script + same args → 100% cache hit."

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:session-stateThis issue is about session, memory, transcript, context, or agent state drift.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions