Aulafy
Courses/Agents and automation/Persistent State and Crash Recovery

Persistent State and Crash Recovery

A 24/7 agent is not reliable because it never fails. It is reliable because it can crash, start again, and know what it was doing without improvising.

  • Separate conversation memory, task state, and durable knowledge.
  • Use checkpoints to resume workflows and audit decisions.
  • Know when to look at Temporal or durable execution for long-running processes.
TerminalCode
capas_estado:
  hot:
    uso: paso actual
    ejemplo: mensajes recientes
  warm:
    uso: tarea en curso
    ejemplo: active_tasks, checkpoint, tool_outputs resumidos
  cold:
    uso: memoria duradera
    ejemplo: preferencias, hechos validados, auditoria

boot:
  1: cargar active_tasks
  2: detectar tareas running antiguas
  3: reconciliar tool_executions
  4: pedir aprobacion si hay duda
  5: reanudar o cerrar con evidencia