Loop 004

The production error sweep

A scheduled production-log workflow that traces actionable errors to root causes, verifies fixes, opens a pull request, and reports the result.

Ready-to-use prompt

Copy the loop

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. Then ping me in Slack with the findings and PR link. If no actionable errors are present, ping me with that result instead.

Verify / stop

Actionable production errors are fixed and verified.

Finish with a pull request and Slack summary, or a clean-log confirmation.

Context and guidance When to use it, steps, safety notes, and related loops
Published
Updated

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 to run it

  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 and report the findings, verification, and link. If the logs are clean, report that terminal state instead.

Why it works

The loop converts passive log review into a closed reliability workflow. It requires a root cause, verified change, review artifact, and explicit communication 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.