Week 1 · Lesson 04

Durable runs

Observability foundation: every invocation gets a run_id and append-only events.

Time · 1 day Observability
Learn
  • Run statuses: running | succeeded | failed | needs_human
  • Append-only event log vs mutable “current state” only
  • Why UI monitoring is impossible without this
Build
  1. Tables: runs, run_events (type, payload, ts)
  2. Every model/tool call appends an event
  3. GET /api/runs/:id returns the full timeline
Checkpoint

After a run, reconstruct the exact tool sequence from the DB alone — no console scrollback required.

Four notes
  • What problem does this layer solve?
  • What is allowed to call it?
  • What must it never do?
  • How do I observe and test it?