GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Looms
  • Docs
  • GitHub
  • Quickstart
  • When to use Looms
  • Add to your app
  • Agents & models
  • Human approvals
  • Schedules
  • Swarms
  • Evaluations
  • Examples
  • Custom modules
  • Debugger

This view

  • Original page
  • New address

GeezerVison is showing looms.sh — Reliability and recovery · Looms

On this page

Reliability and recovery

Durability depends on the host and storage you choose. In-memory examples lose history on exit. SQLite persists locally; production actor hosts must preserve one writer per run and provide wake scheduling.

Replay and recovery are different operations#

Historical replay folds recorded events to reconstruct state and does not dispatch effects. Recovery loads a snapshot and later events, then resumes unfinished work. An effect that lacks a recorded outcome may execute again. Looms does not promise exactly-once actions across arbitrary external services.

A crash after an external action#

  1. Looms requests an external action.
  2. The service performs it.
  3. The host stops before recording success.
  4. Recovery cannot infer success from the local log alone.

Pass ctx.effectId as an idempotency key where the external API supports it. Check that the service retains the key for as long as you may need to retry the action. For unsupported APIs, store a durable operation ID, query the provider for the outcome, or reconcile before retrying. Never assume adding an arbitrary header makes an API idempotent.

Retries and errors#

Effect retry policies count total attempts: maxAttempts: 3 means one initial attempt and up to two retries. Attempt starts and retry deadlines are recorded before the runtime waits, so a restart preserves the retry budget and backoff. Configure start, heartbeat, and execution timeouts for work delivered to external workers. Declare those effects with placement: 'worker' and list the definitions on the queue route. See Effect placement. Worker callbacks include the effect ID and attempt number; stale callbacks cannot complete a newer attempt. Exhaustion records runtime.effect.failed. A handler can stop that budget early with failEffect and nonRetryable: true, or ask the next attempt to wait at least retryAfterMs without shortening the policy backoff. A worker heartbeat can carry details; the next dispatch of that effect includes the latest details so the attempt can resume. The callback response is { status, cancelRequested }, not the run state. cancelRequested tells an attempt that is already running to stop.

Signals and webhook delivery#

Use the embed start/signal idempotencyKey option with a stable runId for retries of the same logical request. Verify webhook signatures and transform allowed webhook payloads into typed events on the server. Deduplicate by the provider delivery ID and correlate by run, thread, and domain identifiers. Retrying with a fresh key defeats deduplication.

Interrupted model streams#

A model call can produce partial deltas before failing. Those deltas may already be recorded; resuming work may incur another model call and different output. Render partial content as provisional, inspect completion events, and decide how your application handles abandoned partial turns. The adapter does not guarantee exactly-once billing or identical regenerated text.

Snapshots, retention, and projections#

A compatible snapshot bounds replay work; it is not a backup or a schema migration. Trimming events removes older audit and time-travel history and can prevent rebuilding new projections from the beginning. Define a retention and archive policy before enabling trimAfterSnapshot.

Projectors run after local commit. Durable delivery stores a cursor per projector name and version, retries without advancing that cursor, and dead-letters exhausted batches. A run can finish before an external index or webhook catches up, so monitor lag and keep projector writes idempotent.

Test recovery#

Test a restart while parked, an interruption during an external action, duplicate webhook delivery, and a deployment with existing runs. The testing guide provides the local restart test. Review versioning before changing definitions.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.