Last reviewed
Correct answer: D. The agents that started before agent twelve, because caching stops at the first one that did not finish and everything after it runs again
Explanation
The principle — a resumed run is replayed in the order the agents started, and the first gap in that order is where reuse ends. Whether a later agent finished does not enter into it.
Why the key is correct — one sentence carries the whole answer, and it is worth reading slowly: replay follows the order agents started. Cached results stop at the first agent that didn't finish, and every agent that started after that one runs again, even if it completed. Agent twelve was still working, so it is the first gap; agents one to eleven started before it and are reused; anything that started after it is re-run whatever state it reached. The reason twelve itself has to start over is stated separately — an agent that was still running when you stopped isn't saved, so it starts over on resume. And there is a boundary on the whole mechanism: resume works within the same Claude Code session, which is satisfied here.
Why the others are wrong — the first is the answer nine readers in ten give, because it is what resume means everywhere else: it treats completion as the test when the test is position in the start order. The second looks for the finished work in the conversation, where a workflow deliberately never puts it. And the third inverts the real limit: reuse works inside the session, and it is the later pick-up from elsewhere that does not.
Remember this — reuse stops at the first agent that did not finish, and everything that started after it runs again.
Sources — Anthropic's Claude Code documentation on orchestrating subagents at scale with dynamic workflows.
Sources
“Replay follows the order agents started. Cached results stop at the first agent that didn't finish, and every agent that started after that one runs again, even if it completed.”
“An agent that was still running when you stopped isn't saved, so it starts over on resume.”
“Resume works within the same Claude Code session.”
“The workflow runtime executes the script in an isolated environment, separate from your conversation. Intermediate results stay in script variables instead of landing in Claude's context.”
Practise 10 questions on this topic
Take Claude Code Workflows — Timed Test 1 (10 questions) — scored instantly, explanation for every question, no login.