# Durable work needs storage

> For agents: start with the [agent guide](https://ratstack.sh/llms.txt). Every page is Markdown by default; add `Accept: text/html` for HTML.

Free workshop: [Build Agent Loops That Never Stop Shipping](/tokenmaxx#interested).

A running server and a recovery record solve different problems. Choose what must survive termination and how the next worker finds it.

> Remember from chapters 8 and 9 that processes lose their state on termination.

Source: [Q02](/lore/durability-bibliography#q02); [B2](/lore/durability-bibliography#b2-elixir-in-action), [B3](/lore/durability-bibliography#b3-designing-elixir-systems-with-otp).

## Failure it prevents

The [service](/lore/services-capture-dependencies) restarts successfully while accepted work disappears.

## Our Effect 4.0.0 reading

`Workflow`, `Activity`, and `WorkflowEngine` describe resumable work. Choose persistent engine storage. `WorkflowEngine.layerMemory` keeps state only in memory.

Source: `packages/effect/src/workflow/Workflow.ts`, `packages/effect/src/workflow/Activity.ts`, `packages/effect/src/workflow/WorkflowEngine.ts`.

## How to check

Kill the worker after acceptance. Recover the same operation identity from the selected backend. This check is our proposal. The books do not prescribe it.

Continue with [Every task needs an owner](/lore/every-task-needs-an-owner), [Checkpoints follow the promised commit](/lore/checkpoints-follow-commits).

Connect this to [the existing rat-stack guidance](/lore/concurrent-work-needs-an-owner).

Use [the durability skill](/skills/durability) for the full review. Return to [the durability index](/lore/durability).

## Sources

1. [Jurić, Saša. Elixir in Action, Third Edition. Manning, 2024.](https://www.manning.com/books/elixir-in-action-third-edition)
   Manning. §5.4.3 Shared-Nothing Concurrency; Chapters 8–9, fault tolerance and supervision; Other Use Cases for ETS. Accessed 2026-10-23.

2. [Gray II, James Edward; Tate, Bruce A. Designing Elixir Systems with OTP. Pragmatic Bookshelf, 2019.](https://pragprog.com/titles/jgotp/designing-elixir-systems-with-otp/)
   Pragmatic Bookshelf. Build a Functional Core; Isolate Process Machinery in a Boundary; Customize Your Lifecycle; Big, Loud Worker-Bees; Add Persistence as a Boundary Service; Test the Boundary. Accessed 2026-10-23.

3. [Effect contributors. Effect 4.0.0. workflow/Workflow.ts](https://github.com/Effect-TS/effect/blob/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src/workflow/Workflow.ts)
   Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

4. [Effect contributors. Effect 4.0.0. workflow/Activity.ts](https://github.com/Effect-TS/effect/blob/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src/workflow/Activity.ts)
   Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

5. [Effect contributors. Effect 4.0.0. workflow/WorkflowEngine.ts](https://github.com/Effect-TS/effect/blob/67ba4e46a11ccda0b6761578bfd22c04ae00167d/packages/effect/src/workflow/WorkflowEngine.ts)
   Effect-TS. Pinned source for our Effect mapping, not a claim from the book. Accessed 2026-10-23.

## Linked from

- Agent guide → An Effect stack so pure (aspirational) Kit Langton will blush. → [Read page](https://ratstack.sh/llms.txt)

- Change log → What changed in the files served here, newest first. → [Read page](https://ratstack.sh/log)

- durability → Keep a rat-stack app standing when a provider, pool, or dependency slows down or a worker dies. Use at any I/O boundary, connection pool, provider call, shared waiter, fan-out, flag, gate, or work that can outlive a request, or when asked "what happens when this is slow", "add a timeout", "make this durable", or "what survives a crash". → [Read page](https://ratstack.sh/skills/durability)

- Durability → Seven durable Effect patterns, each with its seam, its fence, and the incident that taught it. → [Read page](https://ratstack.sh/systems/durability)

- Durability bibliography → Books, checked short quotations, source limits, and Effect mapping provenance. → [Read page](https://ratstack.sh/lore/durability-bibliography)

- Durability starts with a recovery record → A reading order for storage, replay, worker ownership, overload, and recovery tests. → [Read page](https://ratstack.sh/lore/durability)

- Durable timers need recovery → Persist scheduled intent when losing a worker must not lose its deadlines. → [Read page](https://ratstack.sh/lore/durable-timers-need-recovery)

- Effect + Alchemy peers → Public repositories that share rat-stack's prerelease lines. → [Read page](https://ratstack.sh/resources/peers)

- Effect is not BEAM → Fibers share a runtime; scope ownership does not supply isolated heaps or OTP restart strategies. → [Read page](https://ratstack.sh/lore/effect-is-not-beam)

- Every task needs an owner → Give child work a lifetime, a failure observer, and a recovery decision. → [Read page](https://ratstack.sh/lore/every-task-needs-an-owner)

- Full agent guide → An Effect stack so pure (aspirational) Kit Langton will blush. → [Read page](https://ratstack.sh/llms-full.txt)

- Rat Stack lore | rat-stack → Short, source-grounded notes on the ideas and decisions behind rat-stack. → [Read page](https://ratstack.sh/lore)

- rat-stack-mode → Route non-trivial rat-stack code, data, design, investigation, and documentation tasks to every matching playbook and principle. → [Read page](https://ratstack.sh/skills/rat-stack-mode)

- Source change history (log.md) → The generated change log as Markdown. → [Read page](https://ratstack.sh/log.md)
