Skip to content

Build a bug-fix software factory with a human in the loop

Usually the tech lead who owns a service in production, with its developers

Your coding agents fix production errors; a person hands each one off and merges the fix, and a check shows whether the error stopped.

Fig. 01Build a bug-fix software factory with a human in the loop

The problem

In a software factory, coding agents take the work from spec to merged code, and production is where it meets real use. What breaks there comes back as an error tracker’s list: what failed and how often. Not which part of the system threw it, what calls that part, or how it gets back to the line as a fix.

Teams now hand an error to a coding agent, and the agent opens a pull request. The review checks the diff. Whether the error stopped is a question someone asks days later, if they remember to.

How it goes

The same steps the product’s playbook walks. Each one shows the screen at that moment and opens the video there.

  1. Watch production errors

    Connect Sentry in your coding agent and choose the Failing systems watch. Each error lands on the node whose code threw it, with its event count and whether it is rising. A critical error on a node many others call shows what calls it.

  2. Run it every day

    A scheduled run reads Sentry each morning. An error that comes with a fix and a high priority becomes a draft work item, one per error, linked to the error it came from.

  3. Hand off what to fix

    The architect reads each draft, edits its instructions, and hands it off. An error the run did not draft becomes a work item from its insight. Only a handed-off work item reaches a coding agent.

  4. Fix it with your coding agent

    A developer's coding agent picks up the work item with the board's design and decisions, plans the fix, and makes it on a branch. The team reviews and merges the pull request as usual. The next run reads Sentry again, and the work item shows whether the error stopped since the fix merged.

  5. Done

    End proofDone when the work item shows its error no longer reported by Sentry since the fix merged.

    Run this playbook

    Free account. Opens in ProvenMap as Turn production errors into fixes, with the steps beside you.

Works with

Sentry
Read by your coding agent through its own Sentry connection, or a token in the scheduled run's environment.
The repo's board
Analysed and synced, so a stack frame's file finds its node.
A scheduled run
Daily, on a machine or routine your team runs.
Your coding agent
Claude Code, Codex or Cursor, with the code plugin.

Where it stops

  • Analysis runs locally in your own session; only derived metadata is pushed. The Sentry connection is your coding agent's.
  • ProvenMap does not write the fix or open the pull request. Your coding agent does, and your team merges it.
  • An error whose stack names no file on the board lands on the board itself, marked unmatched, until you map it once.
  • No longer reported is Sentry's count over the watch's window. A path with little traffic can go quiet without being fixed, and so can a fix that catches the error and drops it.
  • Behaviour is not tested here. Reproducing the bug and testing the fix stay with your team's tests.

Walk through it

  • The docs walkthrough of this job is being written.
  • In the product this job runs as the playbook Turn production errors into fixes. The board ticks each step when what it asked for exists, and the guide links back to this page.

Start with one system

Map a real system and see the architecture around it.

Open one repository and run the code plugin. No migration, no rollout, no diagramming.

No credit card · Analysis runs locally in your own session · Self-hosted available

See the four commands to your first board →

Or for writing on architecture that stays connected across systems.