← seriesmaclulich.com

Give your coding agent the old repros before it redesigns patched code

24-second silent illustration of the original trial plan, not a measured outcome.

Four things to give an agent that is redesigning patched code

  1. Give the reviewer more to rerun than a fix subjectA subject like “fix: retry cleanup” tells the agent where to look and gives the reviewer very little to rerun.
  2. Put the failing command and expected result in the redesign briefEven an ugly patch may protect a real edge case, so the next agent gets the original repro.
  3. Tell an unattended agent how to decide when nobody can answerThe brief should say how to proceed when a decision is needed and nobody is there to answer.
  4. Accept the rewrite only after independent checks passFix the expected answers first, hold back cases for behaviours already specified, and isolate the starting commit from later history.
From my own fix history, readers’ comments and my plan for the redesign trial.

Give the reviewer something to rerun

If you ask coding agents to rewrite code that has been patched many times, this chapter of Fewer tokens to ship is for you.

Once chapter 3 lets you see the loop, an agent rewriting that troublesome code needs a way to check the behaviour the old patches protected.

My reminder, which nudges an agent to redesign when it spots a loop, shows recent fix subjects. A subject like “fix: retry cleanup” tells the agent where to look. It gives the reviewer very little to rerun. Original account

Carry the failing command into the redesign brief

The reviewer runs the original failure case against the candidate rewrite.
The reviewer runs the original failure case against the candidate rewrite.

Two readers pointed out what’s missing from that history. Even an ugly patch may protect a real edge case, so I want to give the next agent the original repro. Prior attempts · Regression coverage

A reader asked whether I’d keep the failing output too. I’d put the command and expected result in the job brief, with a short, redacted excerpt if it helps explain the failure. Reader discussion

How far to trust it

Unattended redesigns haven’t worked yet in my runs

  1. Test the approach before relying on itEight unattended runs produced no successful completed redesign.
  2. Plan, not resultsThe video and pictures show the original trial plan, not a measured outcome.
The trial results are in chapter 5.

Try it on your rig

  1. When the same failure returns, use its record to build the next brief.
  2. Include the failing command, expected result, prior attempts and the behaviours a rewrite must preserve.
  3. Tell an unattended agent how to proceed if a decision is needed and nobody is there to answer.
  4. Fix the expected answers before the trial.
  5. Give the reviewer independent checks, including held-back cases for behaviours already specified, and isolate the starting commit from later history.
  6. Accept the rewrite only after it clears those checks.

To follow along on your own setup, start with the shared work record in the series setup guide.

Once the change lands, add the merge and all attempts to the scorecard. Next, measure what it took to deliver.