DebugBundle
Incidents

Reproduction

How DebugBundle generates reproduction artifacts from captured request context.

When a bundle has sufficient request context, DebugBundle automatically generates reproduction artifacts — ready-to-run commands and structured specifications that recreate the failing request.

Reproduction Artifacts

Each reproduction includes three formats:

cURL

A complete, ready-to-run cURL command:

curl -X POST 'https://api.example.com/checkout' \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json' \
  --data-raw '{"cart_id":"cart_01H...","step":"payment"}'

HTTPie

A complete HTTPie command:

printf '%s' '{"cart_id":"cart_01H...","step":"payment"}' | \
  http POST 'https://api.example.com/checkout' \
  'Content-Type:application/json' \
  'Accept:application/json'

JSON Spec

A structured, machine-readable specification:

{
  "method": "POST",
  "url": "https://api.example.com/checkout",
  "headers": {
    "Content-Type": "application/json",
    "Accept": "application/json"
  },
  "query": {},
  "body": {
    "cart_id": "cart_01H...",
    "step": "payment"
  }
}

The JSON spec is designed for programmatic use — agent tools, test frameworks, and CI pipelines can consume it directly.

Reproduction Confidence

Each reproduction includes a confidence score (0–1) and a reason:

FieldDescription
possibletrue if reproduction can be generated; false otherwise.
confidenceNumeric confidence score (0.0 to 1.0).
reasonWhy reproduction is (or isn't) possible: request_context_available, insufficient_context, etc.

Feasibility by Scenario

Different types of bugs have different reproduction feasibility:

ScenarioFeasibilityNotes
Standard HTTP bugsHighDirect request replay usually reproduces the issue.
Frontend interaction + failing requestMedium-highRequest context is available; browser state may differ.
Background jobsMediumJob payload may be available, but timing and queue state matter.
External outage timingLow-mediumThird-party state can't be replayed.
Race conditionsLowTiming-dependent; single request replay may not trigger.

What Gets Included

The reproduction engine builds artifacts from the request context captured by the SDK:

Data SourceUsed For
context.request.methodHTTP method in the command.
context.request.pathURL path.
context.request.queryQuery string parameters.
context.request.headersRequest headers (sensitive values are redacted).
context.request.bodyRequest body.
context.responseNot included in reproduction (used for bundle context only).

Redaction

Sensitive data is redacted before reproduction artifacts are generated. Authorization headers, cookies, and other sensitive values are replaced with [REDACTED]. This ensures reproduction commands are safe to share in issue trackers, chat, and CI logs.

Accessing Reproductions

API

curl https://api.debugbundle.com/v1/incidents/inc_01H.../reproduction \
  -H "Authorization: Bearer dbundle_member_a1b2c3d4..."

CLI

debugbundle incidents show inc_01H... --reproduction

MCP

get_reproduction(incident_id: "inc_01H...")

When Reproduction Isn't Possible

Reproduction artifacts require request context. They won't be generated when:

  • The error occurred outside an HTTP request (background jobs, cron tasks).
  • The SDK didn't capture request context (configuration, SDK limitations).
  • The error is in a frontend-only path with no triggering network request.
  • The event type is log_event, deploy_metadata, or probe_event.

In these cases, reproduction.possible is false and reproduction.reason explains why.

Using Reproductions in CI

The JSON spec format integrates well with test frameworks:

import spec from "./reproduction.json";

test("reproduce incident inc_01H...", async () => {
  const response = await fetch(spec.url, {
    method: spec.method,
    headers: spec.headers,
    body: JSON.stringify(spec.body),
  });

  // Verify the fix: this should no longer return 500
  expect(response.status).not.toBe(500);
});

Next Steps

On this page