retrysafe
← All rules

retry-loop-with-effect

warning

An in-code retry (loop, p-retry, async-retry) wraps a non-idempotent call that has no stable idempotency key.

Why it goes wrong

A timeout does not mean the call failed: the remote side may have done the work. Retrying it without a key repeats the effect.

Safe pattern

Pass an idempotency key that stays the same across attempts, or only retry calls that are idempotent.

Configure

// retrysafe.config.ts
export default defineConfig({
  rules: { "retry-loop-with-effect": "warning" }, // or "off"
});

// or, for one line (a reason is required):
// retrysafe-ignore retry-loop-with-effect -- <why this is safe>