← Back to Concept Contrast

Concept Contrast Fable

Tasks can resume from checkpoints and queue for execution

Conclusion first:The task queue is responsible for lining up tasks and distributing them to executors, while durable execution is responsible for enabling long tasks to continue from a checkpoint after failure, restart, or interruption. Queuing solves waiting and distribution; resumption solves recovery after failure.

The task queue is responsible for lining up tasks and distributing them to executors, while durable execution is responsible for enabling long tasks to continue from a checkpoint after failure, restart, or interruption. Queuing solves waiting and distribution; resumption solves recovery after failure.

Fable

The post station's letter rack and itinerary book

On the ancient road there was a row of post stations, each with a letter rack at its entrance. When the messenger horse team arrived, they took a letter from the rack and handed it to the rider of the next leg. The rack was large, holding several hundred letters, arranged by priority, and the riders never took letters in the wrong order. This ancient road had run for ten years, and there were no major problems with the speed and order of letter delivery.

Later the trade route extended, and a letter had to pass through seven or eight courier stations before reaching the coast. The journey grew longer, and the chance of trouble rose. If a rider fell ill at the fourth station, the letter sat in the bag; the next station did not know where the letter had arrived, nor whether to send someone back to look for it. By the time the rider recovered and set out again, the couriers had already changed a round, and no one remembered which seals had been stamped earlier or which fork in the road had been taken.

The post station hired an old record keeper, who no longer only sorted letters but also kept a journey ledger. Before each letter set out, its origin and destination were recorded; at each station the rider stamped it and wrote a line of status—weather, road conditions, handover person. If a rider fell ill, the journey ledger would show that the letter was stuck at the fourth station, and the next rider could pick it up from the fourth station without starting over.

The letter rack and the itinerary book gradually took on different responsibilities. The letter rack arranged who went first, who went later, who was urgent, and who was ordinary; the itinerary book recorded how far each letter had traveled, where it was stuck, and who to find next. Without the letter rack, letters piled up with no one to dispatch them; without the itinerary book, interruptions on long routes became cases with no leads.

Once a flash flood washed out the road at the fifth station, and the itinerary book showed six letters somewhere around the fifth station. The postmaster did not wait for the road to be repaired; instead, he looked up each letter's destination and origin in the itinerary book and temporarily switched to three mountain detour routes to relay the letters onward separately. The letter rack only knew on which day these letters were picked up; only the itinerary book knew where they were stranded.

Later, the relay station also introduced automatic riders. They ran fast but didn't proactively leave marks. The station chief required that every leg of the route be recorded when completed, and if not completed, a reason for interruption must be left, so that the automatic riders' dispatch system wouldn't only see that a task was sent out but not know where the task died.

When the old registrar retired, he handed the itinerary book to the new young man and said only one thing: the letter rack lets people know how much work is waiting, and the itinerary book lets people know how much work has already been lost.

Durable execution

Ensure that long tasks can continue from the last state after process crashes, node restarts, or network interruptions, relying on state persistence, retries, and idempotency mechanisms.

Task queue

Middleware responsible for receiving, queuing, and distributing tasks, managing task priority, concurrency, and distribution policies, but not guaranteeing that an individual task can recover after interruption.

Story Mapping

  • Station letter rack: the task queue handles queuing, dispatch, and priority management
  • Itinerary book: persistent execution records the status, breakpoints and recovery paths of each task
  • The sick rider's letter stuck at the fourth station: after a long task interruption, the queue cannot locate or recover
  • Flash flood cuts the road: durable execution uses state records to reroute tasks
  • Automated riders require records: automated tasks need more explicit state persistence

Translating into long-task Agent architecture

When an Agent runs long tasks across multiple turns, tools and possibly days, a task queue alone is not enough. A durable execution layer must be added so that each task's intermediate state, tool call results, approval status and current progress can be persisted, ensuring that after a restart or timeout it can resume from the breakpoint rather than starting over or silently losing work.

京ICP备2026014272号