# molted trace

Source: https://molted.email/docs/cli/trace

Get the full decision trace for a send request

## Agent context

Trace and timeline are debugging tools for understanding what happened with a send request. Use the requestId from any send response.

### Trace — shows the full decision trace for a send request

```bash
molted trace <requestId>
# → {
#     "request": { "requestId": "...", "recipientEmail": "...", "templateId": "...",
#                  "status": "sent", "deliveryStatus": "delivered", ... },
#     "policyDecision": { "requestId": "...", "decision": "allow", "reason": null, "createdAt": "..." },
#     "deliveryEvents": [
#       { "eventType": "delivered", "providerName": "resend", "occurredAt": "...", ... }
#     ],
#     "auditEvents": [
#       { "eventType": "mail.send.executed", "eventJson": { "status": "sent", ... }, ... }
#     ]
#   }
```

Use this when a send is blocked and you need to know which policy decision was made and why. Check policyDecision.decision ("allow" or "block") and policyDecision.reason. An unknown requestId is a 404 request\_not\_found.

### Timeline — shows delivery events after the send

```bash
molted timeline <requestId>
# → [
#     { "id": "...", "event_type": "queued", "provider_name": "mock", "occurred_at": "...", ... },
#     { "id": "...", "event_type": "sent", "provider_name": "mock", "occurred_at": "...", ... },
#     { "id": "...", "event_type": "delivered", "provider_name": "mock", "occurred_at": "...", ... }
#   ]
```

Use this to track delivery progress: sent → delivered → opened/clicked (or deferred, bounced, complained, failed). Real providers report these events as their webhooks arrive; the mock provider synthesizes queued, sent and delivered immediately on send. Note the timeline's fields are snake\_case, unlike trace's.

Related: [`molted send`](https://molted.email/docs/cli/send.md), [`molted analytics`](https://molted.email/docs/cli/analytics.md)

## Commands

### molted trace

Get the full decision trace for a send request

```bash
molted trace <requestId>
```

| Argument | Description | Required |
| - | - | - |
| `<requestId>` | | yes |

See [CLI overview](https://molted.email/docs/cli.md) for global options, credentials and output format.
