Workflow resume replays cached node results that are transient or that crashed the script
Status Open
Maintainer reply None cached
Workaround ✓ Mentioned in description ↑
Activity 0 comments · opened Oct 6, 2026
Environment
Claude Code CLI, Workflow tool with resumeFromRunId.
Behavior
resumeFromRunId replays any cached agent() result whose (prompt, opts) is unchanged. The cache keys on the call shape only — not on whether the result was usable.
Problem
Two classes of results replay when they should re-run:
- Results that crashed the script. A node returned schema-valid but semantically wrong output (prose instead of a worktree path); the script threw while consuming it. On resume, the same bad result replays (0 tokens, ~50ms) and the script crashes identically — resume can never get past it without editing the script to change the prompt.
- Transient verdicts. A run that returned a 'launch_blocked' style result (a mutex/slot was taken at the time) replays that verdict on every resume, even after the slot is free — the workflow is permanently blocked unless re-launched from scratch, losing all other cached work.
Workaround we use
Script-side validate-and-retry under a different prompt: the replayed bad result fails the script's shape validation and the retry's changed prompt misses the cache and runs live. This only covers nodes we wrapped that way.
Request
Either (a) invalidate a node's cache entry when the script throws while consuming its result, (b) an agent() opt to mark a result non-cacheable/transient, or (c) a resume flag to selectively invalidate nodes by label. Happy to provide run journals.