Should Modal Compute and Agent State Run Separately?
Keep compute-heavy jobs on Modal when they can resume from an explicit work manifest. Measure checkpoint overhead against avoidable GPU replay before choosing a checkpoint cadence.
Choose storage by what a resumed run needs
For an agent backed by the Claude Agent SDK, inventory transcripts, instruction files, and generated artifacts separately. A transcript adapter can restore conversation history while a job still fails because the working directory holds its only progress marker. Give the coordinator a manifest that maps each work-unit ID to an output digest and a completion marker in durable storage. Pass the batch job a manifest revision and have it report which IDs it committed. To test the split, process ten synthetic units, end the disposable worker after the sixth reports completion, and start a fresh worker from the same manifest. Inspect which IDs it processes again and verify the final output digests. If the transcript resumes but the worker begins at unit one, fix the artifact or progress storage before changing compute providers.
Hosting the Agent SDK - Claude Code DocsMeasure whether checkpoints save GPU time
Time checkpoint writes while the GPU is allocated, then compare those seconds with the recomputation a checkpoint would avoid. Using the supplied Modal H100 SXM5 task rate of $0.001097 per GPU-second, an illustrative 30-second checkpoint costs $0.03291 in GPU time. If a restart would otherwise repeat 900 seconds of work and a checkpoint reduces replay to 120 seconds, the avoided GPU cost is about $0.856 per such restart. Count every scheduled checkpoint across the workload, including successful runs that never restart. Measure GPU-held time separately from time a coordinator spends updating the manifest after compute is released. For a concrete comparison, replay the same synthetic interruption trace at two checkpoint intervals and compare total GPU-seconds per completed batch. Include storage and transfer costs separately when they differ across the two designs.
Pricing: Pay per second for GPUs and CPUs | Modal