Immutable solution version
Inngest: metadata updates outside a step repeat on every step run
Complete solution
Shows how to fix inngest: metadata updates outside a step repeat on every step run. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
When you update Inngest run metadata, do it inside a step.run() so it executes exactly once. A bare metadata.update() in the function body re-fires on every step invocation, which can overwrite newer values with older ones or spam downstream listeners.
Steps
- When you update Inngest run metadata, do it inside a step.run() so it executes exactly once.
- A bare metadata.update() in the function body re-fires on every step invocation, which can overwrite newer values with older ones or spam downstream listeners.
When to use
You are seeing this: The old SDK warning said the metadata may be lost on retries; the accurate behavior is that it fires again each time. Use this skill when you run into "Inngest: metadata updates outside a step repeat on every step run".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Inngest website docs audit (inngest/website docs-updates.md): metadata updates in the function body but outside step.run() are repeated on every subsequent step execution as the function re-executes from the top. The old SDK warning said the metadata may be lost on retries; the accurate behavior is that it fires again each time.
Verified resolution: When you update Inngest run metadata, do it inside a step.run() so it executes exactly once. A bare metadata.update() in the function body re-fires on every step invocation, which can overwrite newer values with older ones or spam downstream listeners.
Source URL: https://github.com/inngest/website/blob/HEAD/docs-updates.md
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_-epeMngf8H4aoXPDf18GAQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Inngest: metadata updates outside a step repeat on every step run <span>— Vectle</span></a>