Long-Running & Durable Agents
18 questionsDONEUNLOCKEDLOCKED
Long-Running & Durable Agent Interview Questions
Agents that run for hours, survive crashes and wait days for a human. Event histories and replay, idempotent side effects, approvals bound to an exact action, budgets enforced outside the model, drift and loop detection, and deciding when a run is really done.
Worked answers that trace the run, put each decision on the right side of the authority line, and end with the follow-ups and scoring a panel applies.
You have 5 free answers unlocked here.Sign in free for 1 more · 12 are premium.
01–08Foundationsthe mechanisms behind this topic, and the terms a panel uses for them0/8 done
09–15Core questionsthe questions this topic is most often tested on, with full worked answers0/7 done
16–18Field scenariosopen-ended designs, incidents and trade-offs where you must state what is missing0/3 done
The concepts behind Long-Running & Durable Agents
Lessons behind these answers. The opening lessons are free; deeper ones are Premium.
Foundational
Durable ExecutionDurable execution makes a long-running process survive failures by recording an event history: each step that touches the outside world (a model call, a tool call, a timer) runs as an activity whose result is persisted, and a crashed run is rebuilt by replaying that history, returning recorded results instead of repeating work. For agents, model and tool calls are activities, the loop's control code must replay deterministically, and side effects still need idempotency because activities run at least once.Core
Side Effects That Survive RetriesDurable runs retry activities, and a retried side effect can happen twice. When the target system supports idempotency keys, use them. When it does not, the agent needs a protocol: write an intent record before acting, embed a unique reference in the request so the effect can be found later, treat a timeout as an unknown outcome to be resolved by lookup rather than by retrying, and reconcile periodically against the system of record. The outbox pattern keeps intent and action consistent, and anything the system cannot resolve goes to a person.Sign in
Advanced
Waiting for PeopleHuman-in-the-loop steps turn agent runs into processes that wait for hours or days. A durable design persists the run's state, releases workers and connections, and resumes on a signal (the decision) or a timer (a reminder, an escalation, an expiry). The approval must be bound to the exact action shown to the approver, so a run cannot ask about one thing and do another; it must come from someone entitled to give it; and before acting on it the run rechecks anything that may have changed while it waited.🔒 Premium
Advanced
Budgets, Loops and TerminationLong-running agents need termination guarantees at three levels. Within a run, budgets for money, time, steps and per-tool use are recorded in durable state so a restart cannot reset them, and progress is measured by new information or completed work rather than by step count, which catches loops whose steps all look slightly different. Across runs, fleet-level limits and spend anomaly alerts stop a bug that is cheap per run but runs ten thousand times. And every limit ends the run cleanly, with a reason, a partial result and a record.🔒 Premium
Advanced
Long-Horizon CoherenceAs tasks stretch from minutes to hours, the limiting factor shifts from single-step skill to coherence across many steps and context windows. METR's 2025 measurements of AI task-completion horizons showed the length of tasks models can finish growing quickly, and with it the cost of drift. Coherence comes from structure outside the model: an immutable goal and constraints, a task list with status, a decision log with reasons, acceptance tests that define done, milestone checks against those anchors, and fresh-context restarts that rebuild from state rather than from a long transcript.🔒 Premium
Advanced
Event-Driven and Background AgentsBackground agents run without a person watching: a task is queued, a worker claims it, the agent works, and the result arrives later. Event-driven (ambient) agents react to events such as a new ticket, a failed build or a changed record. The engineering problems are distributed-systems problems: events arrive twice or out of order, so handling must be idempotent; claimed work needs a lease that expires; an agent whose actions emit the events it listens to can trigger itself forever; and people need an inbox showing what the agent did, what it is waiting for and what it wants approved.🔒 Premium
Advanced
Queues, Leases and Workers for Long Agent JobsAgent runs that take minutes or hours run as jobs: a request enqueues a job and returns an id, a worker takes the job under a lease with an expiry, the worker heartbeats to extend the lease while the run progresses, and a worker that dies lets the lease expire so another worker can take over from the last checkpoint. Four mechanics make this safe. The lease is an atomic claim, so two workers never run one job. Each step the worker completes is recorded with an idempotency key, so a takeover does not repeat side effects. Retries are counted per job and a job that keeps failing goes to a dead-letter queue with its history instead of circulating. And the queue has a bounded depth with admission control, so a burst of requests produces honest waiting or refusal rather than an unbounded backlog. The same shape underlies hosted durable-execution engines; building it once makes those engines readable.🔒 Premium
Advanced
Versioning Prompts, Tools and Models as One ReleaseA change to a system prompt, a tool description, a model id or a harness setting changes what an agent does, and any of them can be changed without a code deploy, which is how agents regress with nothing in version control to show for it. The fix is to treat the four as one release unit with one version id: content-addressed, built together, recorded on every trace span, and promoted through the same gate as code. Two consequences follow for long-running agents. A run that started on version 12 must finish on version 12 unless it is deliberately migrated, because a mid-run prompt or tool change can make the recorded history uninterpretable and the next step inconsistent with the last. And a release is checked by replaying recorded runs through the new version and diffing trajectories, which finds a changed tool call that an eval average would hide. Versioning is what turns 'the agent got worse on Tuesday' into a diff.🔒 Premium
FROM THE BLOG
AUTONOMY AND LONG-HORIZON AGENTS · 24 NOV 2026Always-On and Background Agents in Late 2026: OpenAI Dots, Codex Cloud, Claude Ship, Copilot Fusion and the End of JulesAUTONOMY AND LONG-HORIZON AGENTS · 24 NOV 2026Long-Horizon Agents in Late 2026: METR's New Measures, Day-Long Runs, and What Still BreaksRUNTIMES AND COMPUTE · 24 NOV 2026What Is an Agent Substrate? Suspend, Resume and Isolate: the Layer Under Agent Runtimes
Unlock all 18 answers · $25
All 19 topics with every worked answer, all lessons and courses, the full practice bank, and anything new that appears during your access.
6 months · One payment · No auto-renewal