published fresh until

Rivet: persist long-running agent progress and retries

Summary Give each Rivet Actor a stable identity, persist tool results with progress, and reconcile uncertain side effects before retrying. Start with npm install rivetkit

Not for Pi Durable on Cloudflare Durable Objects; see pi-durable-long-running-agent-cloudflare RivetKit getOrCreate; missing tool result after wake; cron error skipped; actionTimeout sleepGracePeriod; operation idempotency and schema migrations.

For your agent
claude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp

Read-only, no account. Sign-in is only for trial reports: /connect.md

What this thread does

Do first: install rivetkit, address one Actor by a stable session key with getOrCreate, and persist tool results beside conversation state before scheduling more work.

Short answer

As of November 2026, this is Rivet Actors, not another graph-editor product named Rivet. Each Rivet Actor has its own SQLite database; its update advises users needing unavailable deployment features to retain the earlier backend. Use the current Actor APIs with an explicit deployment/version check. Durable storage does not make external side effects exactly once: your application needs durable operation identities and recovery decisions.

Choose / don't choose

  • Actor-local SQLite: choose for conversation, tool inputs/results and operation status with related atomic writes.
  • Ephemeral variables: choose caches that can be reconstructed; don't put the only copy of a tool result in vars (configuration).
  • Scheduled action: choose bounded steps with saved progress between invocations; don't expect failed schedules to retry immediately (behavior).

Not for: Pi Durable on Cloudflare Durable Objects; see pi-durable-long-running-agent-cloudflare.

Settings that matter

Setting or flagValue / defaultApplies toSource
getOrCreate([key])Reuse the same stable agent/session key after reconnect/restartCurrent RivetKit docsquickstart
db: db({ onMigrate })Store durable records; migrations run atomically in a savepointCurrent RivetKit docsSQLite
options.actionTimeoutDefault 60000 ms; bound each step, not a whole multi-day agentCurrent RivetKit docsconfiguration
options.sleepGracePeriodDefault 15000 ms covers graceful lifecycle and final saveCurrent RivetKit docsconfiguration
options.stateSaveIntervalDefault 1000 ms; not an atomic commit with a remote serviceCurrent RivetKit docsconfiguration
c.schedule.after, c.schedule.atDelay or Unix timestamp in milliseconds; await schedulingCurrent RivetKit docsschedules
c.cron.setStable name, five-field expression; timezone defaults UTCCurrent RivetKit docsschedules

Order of operations

1. Use the Node quickstart / SQLite example. Save conversation, call identifier, arguments, result, status and schema version durably. Deployment options determine failure boundaries. 2. Proposed application pattern: commit an operation intent before issuing a side effect. Give the external service an idempotency key if supported; on restart reconcile an uncertain outcome before repeating it. Store result and progress together with c.db.transaction; perform remote calls outside the transaction (transaction behavior). 3. Persist the next-step intent, then await scheduling and save its returned identity before acknowledging completion. Because this does not establish a single transaction spanning SQLite and scheduling, recovery must reconcile pending intents and tolerate duplicate steps. Acknowledge external messages only after durable progress exists. 4. Resume with the same key, read saved tool results, and refuse a model continuation when evidence is missing. Compare a completed external operation's identifier before retry. Add numbered SQL migration steps applied in order for evolving data; upgrade docs describe atomic migration ladders.

Known failures and fixes

Error or symptomCauseFixSource
Tool result missing after waketakeitwhen reports treating resume as unsafe unless the last tool I/O was written into the same durable store as the conversation before suspendSave tool I/O with conversation; block continuation if absentfirsthand warning
error in cron historyScheduled invocation failed; one-shot is complete after the attemptImplement bounded application retries; recurring work waits for normal cadenceexecution behavior
skipped in cron historyPrevious recurring run overlaps the nextShorten/checkpoint steps or reduce cadence; don't assume a lost scheduleexecution behavior

Independent evidence: in the launch discussion, fastball describes a switch from Cloudflare Durable Objects and says Rivet v3 has not yet been tried; takeitwhen's warning motivates the result-preservation rule, not a demonstrated Rivet defect. Dated discussion listing. The Rivet repository identifies the platform.

Missing

  • The linked source does not confirm: a local restart does not establish machine-loss recovery.
  • The linked source does not confirm: Shell execution requires its own runtime.
  • The quickstart does not pin an exact RivetKit package release. Confirm SDK/backend compatibility before rollout; no exact SDK version is asserted here.
  • No exactly-once guarantee across SQLite, scheduling and a third-party service follows from these pages. Use application deadlines/retry budgets and reconciliation.

Checked

2026-11-12; Rivet 3.0 backend; current RivetKit docs, November 2026; current quickstart, SQLite/configuration/scheduling/upgrade docs, backend release note, repository, fastball and takeitwhen discussion and dated listing read. No Actor deployment or restart executed.

Started from a post by @Rivet, packaged by the editor. Original post

Subjects

More in agent workflows

For agents

Copy a short instruction for an agent that has WhatWorks connected, or open this page as Markdown.

# Rivet: persist long-running agent progress and retries
Summary: Give each Rivet Actor a stable identity, persist tool results with progress, and reconcile uncertain side effects before retrying. Start with `npm install rivetkit`
Copy for agent
get the whatworks thread rivet-agent-session-durable-tool-results-restart and help me try it

Follow this thread

Following tells you when the verdict changes, a new version ships or a new option is added. Your agent mentions it the next time you ask WhatWorks.

Sign in with GitHub to follow. Nothing is posted for you.

Sign in with GitHub

Or ask your agent
follow the whatworks thread rivet-agent-session-durable-tool-results-restart
WhatWorks

Connect your agent MCP

Paste this into your agent

Connect me to WhatWorks: add https://whatworks.dev/mcp/login and sign me in so I have an account. Steps: https://whatworks.dev/connect.md.

Or run this in your terminal
  • Claude Codeclaude mcp add --transport http --scope user whatworks https://whatworks.dev/mcp/login && claude mcp login whatworks
  • Codexcodex mcp add whatworks --url https://whatworks.dev/mcp/login && codex mcp login whatworks