New: Introducing the Lemma MCP Server, and what we learned building it.New: Introducing the Lemma MCP Server. Read the blog post

Skip to main content

Built to Finish. Through Failure.Never Done Twice.

Payroll, onboarding, month-end: the processes worth automating are the ones that cannot stop halfway or run twice. Every run records its history as it goes, so an interruption resumes from the record, a timeout retries under your policy with a key that keeps the work from happening twice, and when a call still fails, your error handler decides what happens next. The record shows exactly what did.

Before You Trust a Worker With Payroll.

The processes worth automating are the ones that cannot stop halfway or run twice. A run keeps its promise through restarts, timeouts, long waits and bad responses, and it can prove what it did. That is what lets a team hand it payroll.

Recover

Stopped halfway? Nothing starts over.

The runtime records each run’s history as it goes. After an interruption it rebuilds progress from that record: a call whose completion was recorded is not made again, and the run picks up at the first step that had not finished. An operator can also retry an eligible failed or cancelled run: Lemma starts a linked run on the same published version of the Worker, skips the steps that already finished and reruns the one that stopped.

Recorded history
Progress rebuilt from the record; recorded results are reused, not requested again.
Retry a failed run
A linked run on the same published version, the finished steps skipped.
Paged calls
Pages already accepted from a paged API are saved, so a retry continues from there.
Retry safely

Time out. Try again. Update once.

Three settings on one API call answer what happens when a system times out after it has already accepted the request. The timeout bounds each attempt; the retry policy sets how many attempts, the first delay, the backoff and the longest delay; and an idempotency key, a unique key sent with every attempt, lets a system that supports it apply the change once. Earlier steps keep their results while the call retries inside the same run.

Timeout
The longest each attempt may take; attempts, delays and timeout together bound the whole call.
Retry policy
How many attempts, counting the first; the first delay; the backoff; the longest delay.
Idempotency key
One key for a call’s attempts, or one for a business action across runs, honoured for as long as the receiving system keeps it.
Decide

A 404 is a route, not a failure.

An API call can branch on the response it gets: an exact status, a class such as 4xx, or a range. Route a 404 to collecting the missing employee details and a 403 to requesting access; the first match wins. For the Worker as a whole, a completion handler records success once, and an error handler opens a case after an eligible failure, choosing what to do from the error, its category, the step that failed and whether retries ran out.

  • Match an exact status, a class or a range; the first match wins
  • A completion handler and an error handler, set once for the Worker
  • Failures you can act on: the error, its category, the step and the retries
Pause and resume

Wait for a person. Wait for a system. Carry on.

A review step asks a person for an approval, a correction or a missing field; the answer joins the run’s data and the run carries on from there. Another step waits for a matching callback or webhook from the system that owns the next move, and a polling step checks on an interval until a condition is met or its attempts run out. A review that times out can route to an escalation step.

  • Human review
  • Wait for a callback
  • Poll until done
  • Escalate on timeout
Debug and observe

Prove it in a draft. Explain it in production.

In a draft test run, set a breakpoint to pause before a step and inspect the run’s data, mock an API call’s response, supply a reviewer’s answer or skip a wait, or reuse a step’s output from an earlier run to reproduce a hard case without calling the real system; published runs execute every step for real. In production, open a run to its steps, calls, errors and final data, with the logs grouped by step and linked to the canvas, then use the metrics and logs across runs to tell one bad run from a dependency failing everywhere.

Breakpoints and mocks
Pause a test run and inspect it, or substitute a response
Retry from the failure
A new run that resumes where the failed one stopped
Run logs
Grouped by step and linked to the canvas
Across every run
Metrics, alerts and export to OpenTelemetry

Every Run, Recorded.

Queued, running, held for a person, failed at a step, complete: each run is a row in the record and a path on the graph, with its attempts and its timing. This is what durable means when someone asks what happened.

Reliability Is the Floor.Not the Feature.

Retries, resume, idempotency, timeouts, handlers, and the record of every attempt are what the runtime does for every Worker. The code your team ships is the business logic, and the night shift is a run that paused and picked up where it left off.

Run It Durably, From Day One.

See a run fail, retry, and finish with our team.

Request a Demo