Loop/loopDebugginghigh riskintermediatesafety C · 55Forward Futurepre-dates current gate · under review

Sweep production errors to root cause

Trace actionable production errors to their root cause, verify the fix, open a PR, and stop cleanly when nothing needs action.

prompt
→ Claude Code
Review our production logs for errors. If you find an actionable issue, trace it to its root cause, fix it, verify the fix, and open a pull request. If no actionable errors are present, stop without making changes.
claude-code · codex

Use this when

Use this as a scheduled reliability pass when an agent can read production telemetry, trace failures into the repository, run the relevant tests, and prepare a reviewable fix.

How it runs

  1. Review the agreed production log window and group repeated symptoms into likely incidents.
  2. Separate actionable product errors from expected noise, transient upstream failures, and already-known issues.
  3. Trace each actionable error to a root cause, implement the smallest appropriate fix, and verify it with focused checks.
  4. Open a pull request for each verified fix. If the logs are clean, stop without making changes.

Done when

✓ Actionable production errors are fixed and verified. Finish with a pull request, or stop when no actionable errors are present.

Why it works

The loop converts passive log review into a closed reliability workflow. It requires a root cause, verified change, and review artifact instead of stopping at a list of errors.

Implementation note

Treat logs as sensitive production data. Do not copy credentials, tokens, personal information, or private payloads into prompts, pull requests, or chat messages.

Source: Forward Future ↗graded C · 55/100 — how grades work →

More debugging loops

Memory leak hunt

Loop/goallooprepoB

Drive a suspected memory leak to ground: reproduce growth under a repeated workload, capture heap snapshots, and fix the retention until memory stays flat.

prompt
→ Claude Code
/goal heap usage stays flat (within 5%) across 500 repetitions of the failing workload in the leak-repro script — capture heap snapshots before and after, identify what is being retained and by which reference chain, fix the leak, and re-run the repro to confirm; stop after 10 turns
debuggingmedium risk

Rewrite every user-facing error

Inventory user-visible errors, replace internal or confusing text, and prove each reachable error state reads clearly.

prompt
→ Claude Code
Find and improve every user-visible error message within [repository, product, or named scope]. If no scope is supplied, use the user-facing surfaces in the current repository and state any exclusions before editing. Inventory error strings in source code, surfaced API or client errors, and reachable browser states. Record each one in a CSV with its location, trigger, current copy, user risk, proposed replacement, implementation status, and verification result. Rank the errors by user harm. Rewrite one coherent group at a time using plain language and a useful recovery step when one exists. Do not expose provider names, stack traces, internal identifiers, or implementation details. After each change, run the relevant tests, exercise the affected state in a real browser when possible, and search again for raw or internal error text. Do not mark an unreachable state as verified. Stop when every row is verified or explicitly blocked. Finish with the CSV, changed files, test evidence, browser evidence, and blocked items.