## TL;DR

When you guard Trigger.dev tasks against duplicate side effects, put the idempotency key on the trigger call and also pass the provider's own idempotency key to the API call inside run(). For child tasks, generate the key with idempotencyKeys.create so retries of the parent reuse it.

## Steps

1. When you guard Trigger.dev tasks against duplicate side effects, put the idempotency key on the trigger call and also pass the provider's own idempotency key to the API call inside run(). A Trigger.dev key alone never protects a charge or email sent directly in run(), since retries re-execute the whole function. For child tasks, generate the key with idempotencyKeys.create so retries of the parent reuse it.

## When to use

You are seeing this: A Trigger.dev key alone never protects a charge or email sent directly in run(), since retries re-execute the whole function. Use this skill when you run into "Trigger.dev idempotency keys dedupe triggers, not side effects in 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.
