Workflow Debugging

Debug in Production

Safe workflow for investigating issues in a live environment

debuggingproductioninvestigation
CLAUDE.md

When investigating a bug in production:

  1. Do not make code changes directly in production. Ever.
  2. Gather evidence: check error logs, monitoring dashboards, request traces, and user reports.
  3. Correlate the issue with recent events: deploys, config changes, traffic spikes, external service outages.
  4. Reproduce the issue locally or in staging using the evidence gathered.
  5. If you need more data from production, add targeted logging behind a feature flag or increase log verbosity temporarily.
  6. Once reproduced locally, fix and test the bug through the normal development workflow.
  7. Deploy the fix through the normal pipeline. Monitor production to confirm the fix resolves the issue.

Copy this workflow into your CLAUDE.md or agent config file so your agent follows this process automatically.

get crystl