[BUG] Force-stopping a workflow clears the agent journal/cache, breaking resume

Resolved 💬 1 comment Opened Jun 29, 2026 by karanshukla Closed Jun 29, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

Force-killing a workflow (TaskStop) clears the journal cache. When a workflow is stopped mid-run
and then resumed with resumeFromRunId, the completed agent results are not replayed from cache — the
workflow restarts from 0. The docs say completed agents return cached results on resume, but this
doesn't hold when the prior run was stopped rather than naturally completed/failed.

Repro for #1: Launch a workflow with 50+ agents, stop it mid-run with TaskStop, then call
Workflow({scriptPath, resumeFromRunId}) — progress resets to 0/N instead of continuing from where it
left off.

What Should Happen?

It should pick up on the cached data from the agents

Error Messages/Logs

Steps to Reproduce

  1. Launch a workflow with many parallel agents (we had ~59):

Workflow({ script: "..." })

  1. Note the returned Run ID (e.g. wf_fa220529-84e) and Task ID (e.g. wu1wgavg2).
  2. Let it run partially — some agents complete, some fail or are still in-flight.
  3. Attempt to resume the still-running workflow:

Workflow({ scriptPath: "...", resumeFromRunId: "wf_fa220529-84e" })

  1. → This correctly errors: "Workflow is still running. Stop it first with TaskStop."
  2. Stop the running workflow:

TaskStop({ task_id: "wu1wgavg2" })

  1. Resume with the same run ID:

Workflow({ scriptPath: "...", resumeFromRunId: "wf_fa220529-84e" })

  1. Expected: Completed agents replay from cache; only failed/incomplete agents re-run. Progress

counter starts at e.g. 32/59.

  1. Actual: Workflow restarts from 0/59. All agents re-run from scratch, including ones that had

already completed successfully.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.195

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗