How to Replay Failed Webhooks Safely With Hookdeck and Codex

How to Replay Failed Webhooks Safely With Hookdeck and Codex

Aident AI

A coral event pulse passes through blue glass audit layers and exits once as a clean amber pulse while a duplicate echo is contained.

How to Replay Failed Webhooks Safely With Hookdeck and Codex

Do not start a webhook incident by replaying the entire failed queue. First prove that the destination is healthy and idempotent, inspect one failed event and all of its delivery attempts, replay that single event, and verify one intended side effect. Expand the recovery batch only after the canary succeeds.

That sequence matters because webhook delivery is commonly at least once. A retry or replay can repeat a charge, message, booking, or record unless the destination recognizes the event as work it has already completed.

This workflow reflects Hookdeck's official documentation and the active Actions discoverable through Aident Loadout on August 27, 2026. Action names and schemas can change, so discover the live contract before every incident.

The Safe Recovery Sequence

Gate

Question

Evidence required before continuing

Scope

Which connection, time window, and failure state belong to this incident?

A bounded issue and event set

Diagnose

Why did delivery fail?

Every attempt's status and destination response

Repair

Is the destination healthy now?

A deployed fix plus a direct health or acceptance check

Deduplicate

Can the same business event arrive twice without a second side effect?

A durable event key and atomic duplicate check

Canary

Does one replay recover exactly one intended outcome?

One replay receipt, one successful attempt, one downstream result

Expand

Is the remaining set still correct and bounded?

A reviewed event list, rate limit, stop condition, and owner

If you have not yet connected agent tools through a managed integration boundary, start with How to Use Aident Loadout.

Discover the Current Hookdeck Actions

Install or update the public Aident CLI from the canonical guide:

Follow https://aident.ai/SETUP.md

Confirm account and Vault state, then search by job:

aident account auth status
aident vault vault --action status

aident capabilities search --targetEnv staging \
  --queries '["list open Hookdeck delivery issues", "find failed Hookdeck events and attempts", "replay one Hookdeck event"]' \
  --types '["action"]'

On August 27, the live staging catalog exposed Hookdeck Actions for these jobs:

  • list detected issues;

  • list and filter events;

  • list delivery attempts for an event; and

  • replay one event.

Inspect each current schema before using it:

aident capabilities get \
  --name "<current Hookdeck event-list Action>" \
  --parts '["description","inputSchema","outputSchema"]'

The catalog currently lets you bound events by status, response status, connection, destination, creation time, attempt count, and cursor. Attempts can be narrowed to one event ID. The replay Action accepts one evt_ event ID. Do not treat this article's names as an execution contract if discovery returns a newer version.

1. Bound the Incident Before Reading the Queue

Start with the smallest window that explains the alert. Record:

  • the Hookdeck connection and destination;

  • the first and last known failure times in UTC;

  • the expected HTTP status and actual response class;

  • whether the source is still sending new events;

  • the business operation behind each event;

  • the maximum safe recovery rate.

List open delivery issues and failed events only for that boundary. A useful read plan is an open delivery issue query followed by an event query with the relevant webhook_id, a created_at range, and a failed response filter. Paginate with returned cursors instead of silently assuming the first page is complete.

Do not bulk retry at this stage. A broad queue can mix the incident with old failures, expected rejects, test traffic, or events already recovered through another path.

2. Inspect Every Attempt for One Event

Select one representative event that has a reversible or easily verified effect. Use the event ID to retrieve every recorded attempt, then compare:

  • request identity and timestamp;

  • destination and connection;

  • response status and response body;

  • timeout or transport error;

  • attempt order and retry interval;

  • whether an attempt may have reached the destination before the client observed failure.

The last case is the dangerous one. A timeout does not prove the destination did nothing. It may have committed the business change and lost the response. Treat an ambiguous timeout as possibly successful until the downstream system proves otherwise.

Hookdeck's documentation distinguishes a retry of an event delivery from replaying an original request through processing and routing again. Pick the operation that matches the recovery job. Do not use replay as a generic synonym for every retry path.

3. Prove Idempotency at the Destination

Hookdeck documents an at-least-once guarantee and recommends idempotent handlers. Its deduplication feature is best effort, so the destination still needs its own durable guard.

A reliable handler usually follows this order:

  1. Verify the provider signature against the unmodified request body.

  2. Extract a stable provider event ID or another approved business idempotency key.

  3. Atomically insert that key into a table with a uniqueness constraint.

  4. If the key already exists with a completed outcome, return success without repeating the side effect.

  5. Perform the business operation and record its result against the key.

  6. Return a success response only when the durable outcome is known.

The idempotency key must identify the business event, not the delivery attempt. A new attempt ID for the same charge or booking should not create a second charge or booking. Define what happens after a partial failure, how long the key is retained, and how concurrent duplicates contend for the same key.

For credential and secret boundaries around this workflow, use Give AI Agents API Access Without Exposing Keys.

4. Preflight One Replay as a Canary

After the destination fix is deployed and its health check passes, prepare one exact replay input and preflight it:

aident capabilities preflight \
  --name "<current Hookdeck single-event replay Action>" \
  --input '{"event_id":"evt_reviewed_canary"}'

Stop if the schema, account, risk acknowledgement, or credit state is unresolved. The preflight is not the replay. Execution changes provider state and can trigger a downstream side effect, so a human should approve the exact event, destination, expected outcome, and stop condition before the Action runs.

After approval, execute only that reviewed input. Immediately retrieve the event's new attempt and verify the downstream business system. Success requires all of the following:

  • Hookdeck recorded the intended replay and a successful delivery attempt;

  • the destination accepted the event;

  • exactly one intended business outcome exists;

  • no duplicate charge, message, booking, or record exists;

  • observability links the source event, replay, attempt, and downstream result.

An HTTP 200 alone is not enough. It proves the handler responded successfully, not that the correct business state exists exactly once.

5. Expand in Reviewed Batches

Re-query the incident boundary after the canary. Remove events that recovered automatically or through another operator. Group the remainder by destination, failure reason, and business risk.

Expand gradually with:

  • an explicit event count;

  • a rate below the destination's tested capacity;

  • continuous success and duplicate monitoring;

  • a stop threshold for error rate or unexpected side effects;

  • an operator who can pause the batch;

  • a reconciliation query after each tranche.

High-value or irreversible events may still require one-at-a-time approval. A bulk retry command is convenient, but convenience does not establish that every event in the filter is safe to repeat.

A Safe Prompt for Codex or Claude Code

Follow https://aident.ai/SETUP.md

Help me diagnose a bounded Hookdeck webhook incident with the installed public
aident CLI. Confirm account and Vault state. Discover current Actions in staging
by job and inspect each exact schema before execution.

Read only until I approve a replay. List open delivery issues, find failed events
for the reviewed connection and UTC window, paginate every page, and inspect all
attempts for one representative event. Treat timeouts as possibly committed.

Before proposing a replay, require evidence that the destination is healthy and
uses a durable business-event idempotency key with an atomic duplicate check.
Preflight exactly one event and report the Action, input, account, expected side
effect, verification query, and stop condition. Do not replay, bulk retry, edit,
or delete provider data without my explicit approval.

After an approved canary, verify one Hookdeck delivery and exactly one downstream
business outcome. Expand only through reviewed batches with a rate limit, stop
threshold, audit trail, and reconciliation step. Report missing evidence instead
of assuming a 2XX response proves recovery

Failure Matrix

Failure

What it means

Next action

Discovery returns a different Action

The live catalog changed

Inspect the new schema and restart preflight

The event set spans unrelated connections or dates

The incident boundary is too broad

Narrow the filters before any replay

The last attempt timed out

The destination outcome is ambiguous

Reconcile downstream state before retrying

No durable idempotency key exists

A replay can repeat the business effect

Repair the handler before recovery

Hookdeck deduplication ignored a replay

The request matched the active deduplication window

Review whether retry or later replay matches the job

Replay returns 2XX but no business outcome exists

Transport recovered but processing did not

Inspect application logs and durable state

The canary creates a duplicate

The idempotency boundary is wrong

Stop the batch and repair the duplicate guard

Error rate rises during expansion

The destination is not ready for the batch

Pause, reduce rate, and diagnose the new failure

Recover One Event

Follow https://aident.ai/SETUP.md

Inspect and recover one failed webhook with a bounded canary

Use the AI agent cost guardrails workflow when recovery can trigger billable provider work beyond the webhook delivery itself.

Method and Limitations

This workflow used the live Aident Loadout staging catalog, current Action descriptions and schemas, official Hookdeck documentation, current Google results, current Reddit discussions, and current YouTube results on August 27, 2026. It did not connect a Hookdeck account, read customer events, execute a replay, test a destination, validate a specific provider signature, or certify Hookdeck's availability, security, privacy, pricing, or delivery behavior for a particular workload. Refresh the workflow when the live Action contract, Hookdeck retry or replay semantics, or the destination's idempotency design changes.

Sources

Re-run the canary and reconciliation sequence whenever the handler, routing, retry policy, or business side effect changes.

Home

Home

Home

Integrations

Integrations

Integrations

Vault

Vault

Vault

Audit

Audit

Audit

Arana Grande

Arana Grande

Arana Grande

Free

Free

Free

30-day audit summary

30-day audit summary

30-day audit summary

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

Daily action-call volume and the latest receipts from the Loadout audit trail.

View Audit

View Audit

View Audit

Loadout usage

Loadout usage

Loadout usage

617 action calls in the last 30 days

617 action calls in the last 30 days

617 action calls in the last 30 days

May 19 - Jun 17

May 19 - Jun 17

May 19 - Jun 17

10 active days

10 active days

10 active days

Less

Less

Less

More

More

More

Recent activity

Recent activity

Recent activity

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Latest action-call receipts from connected agents

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Apr 23, 09:23 AM

Shopify

Shopify

Shopify

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Creates Or Updates An Asset For A Theme

Success

Success

Success

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Apr 23, 09:21 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Success

Success

Success

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Apr 23, 08:53 AM

Shopify

Shopify

Shopify

Update Products Param Product Id

Update Products Param Product Id

Update Products Param Product Id

Failed

Failed

Failed

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Apr 22, 22:13 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Apr 22, 22:12 PM

Shopify

Shopify

Shopify

Create Product Image

Create Product Image

Create Product Image

Success

Success

Success

Connected integration coverage

Connected integration coverage

Connected integration coverage

162

162

162

of 753 accessible connected

of 753 accessible connected

of 753 accessible connected

Callable actions

Callable actions

Callable actions

1,126

1,126

1,126

Vault credentials

Vault credentials

Vault credentials

8

8

8

Explore what's possible

Explore what's possible

Explore what's possible

See all Integrations

See all Integrations

See all Integrations

Google Ads

Google Ads

Google Ads

All available Goolge Ads tools via...

All available Goolge Ads tools via...

All available Goolge Ads tools via...

X (twitter)

X (twitter)

X (twitter)

All available X tools via...

All available X tools via...

All available X tools via...

Github

Github

Github

All available Github tools via...

All available Github tools via...

All available Github tools via...

Notion

Notion

Notion

All available Notion tools via...

All available Notion tools via...

All available Notion tools via...

Slack

Slack

Slack

All available Slack tools via...

All available Slack tools via...

All available Slack tools via...

Firecrawl

Firecrawl

Firecrawl

All available Firecrawl tools via...

All available Firecrawl tools via...

All available Firecrawl tools via...

753 integrations are available for loadouts.

753 integrations are available for loadouts.

753 integrations are available for loadouts.

The one tool

for every tool

your agent needs.

Give any AI agent real capabilities in seconds. Connect 27,000+ tools once, skip the setup headache, and let your agents execute.

Try Aident Loadout

Empower your Codex or OpenClaws to get real jobs done. Connect 27,000+ tools in one prompt, and let your agents deliver real results.

Try Aident Loadout

Empower your Codex or OpenClaws to get real jobs done. Connect 27,000+ tools in one prompt, and let your agents deliver real results.

Try Aident Loadout

Empower your Codex or OpenClaws to get real jobs done. Connect 27,000+ tools in one prompt, and let your agents deliver real results.