Two agents, one limit, one refused.
All examples
Local demonstrations
Updated
2 min read
by Anlyon Team

Reproduce a write with a lost response

A local executable example shows a side effect succeeding before the caller sees an error, then recovers through operation-specific evidence.

local exampletimeoutsreconciliation

An external write can happen before its response is lost. This example models that sequence without sending a refund or email. It uses an in-memory provider fixture and makes no network calls. Its output demonstrates a failure mode, not a measured result from Anlyon or a real provider.

Run the example

Use Node.js 22 or newer. Download lost-response.mjs, save and inspect it, then run:

node lost-response.mjs

Built-in assertions check the fixture and the program prints:

Caller observed an error; provider recorded 1 write.
A fresh operation key creates a second write.
Read-back finds the original operation without another write.
An empty read-back remains unknown.

The fixture first records the operation, then throws instead of returning a response. From the caller's error alone, the result is ambiguous. A naive retry under a different key creates another record, showing why new identity is not a harmless transport retry.

The recovery path looks up the original operation ID. It finds the evidence already stored by the fixture without adding another write. A missing record is deliberately reported as unknown; real systems can have delayed visibility or bounded searches.

Inspect the assumptions

This fixture exposes an operation lookup and uses a Map as its storage. A real provider may not expose the same lookup, may require adapter-specific correlation, and may retain idempotency keys for a limited period. The program does not model crash persistence, eventual consistency or provider authentication.

Use those differences as a checklist when integrating your actual endpoint. Can you identify the operation without the lost response? Does the read-back prove this write rather than a coincidentally matching value? What happens when no evidence is found?

Apply the lesson

Anlyon does not automatically resend unknown action invocations. Supported reconciliation seeks provider evidence, and unresolved exposure remains held. Follow the adapter's documented recovery rather than translating this fixture into an unrestricted production retry loop.

Continue with the timeout explanation, the operator runbook, response-independent verification and the effect recovery reference. Cleanup is deleting the script; the program leaves no external resources or local data files.

Continue with a related task

Free tier, no credit card. One command if you use Claude or Cursor.

$ claude mcp add anlyon -- npx -y @anlyonhq/mcp-server