Reset an idempotencyKey
It would be useful to be able to reset an idempotencyKey. This would be a specific function call in the SDK, and a button in the UI, that would effectively delete the idempotencyKey from a run.
Suggested syntax for the SDK:
await idempotencyKeys.reset("a-key");
Comments2
Pedro Martins
Apr 8, 2025
+1 this one, this important when you have some issue with the queue or the task got stuck for whatever reasons, also required locally if you are getting the same ids.
Dmitrii Bykov (sukazavr)
Mar 2, 2025
I strongly support this feature, as it would help prevent multiple workflows from unintentionally triggering the same task while another instance is already running.
Use Case: Idempotency Key Persistence Until Task Completion
Currently, idempotency keys expire based on a TTL, but in some cases, we need them to persist until the task finishes to ensure that only one instance of a specific task runs at a time. With a manual reset API, workflows could maintain idempotency for their entire lifecycle and explicitly remove the key when the task is complete.
This would provide stronger guarantees against duplicate executions, especially for long-running workflows, without requiring arbitrary TTL adjustments.