-
Notifications
You must be signed in to change notification settings - Fork 278
Flows: opt-in per-node resume (skip completed nodes on re-run) #354
Copy link
Copy link
Open
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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.ClawSweeper 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.This issue is about session, memory, transcript, context, or agent state drift.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Metadata
Metadata
Assignees
Labels
P2Normal priority bug or improvement with limited blast radius.Normal priority bug or improvement with limited blast radius.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:needs-product-decisionClawSweeper marked this issue as needing a product or behavior decision.ClawSweeper 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.ClawSweeper 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.This issue is about session, memory, transcript, context, or agent state drift.issue-rating: 🌊 off-meta tidepoolIssue quality rating does not apply to this item.Issue quality rating does not apply to this item.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Context
Claude Code's native
Workflowtool supports deterministic resume: relaunch withresumeFromRunId, and the longest unchanged prefix ofagent()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:
~/.acpx/flows/runs/<runId>/checkpoint()provides human/external pause-resumeGap
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. Onacpx 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+ journaledagent-<id>.jsonl, "same script + same args → 100% cache hit."