Skip to content

v1.3.0

Latest

Choose a tag to compare

@patchmill-release-please-bot patchmill-release-please-bot released this 29 Nov 19:05
1ba977c

1.3.0 (2026-11-29)

Patchmill 1.3 turns Patchmill into a factory that improves itself. Each Issue run can now end with a Retro. A Retro reads the session files of the whole run, from the phase sessions to every subagent and the Console, and finds what got in the agent's way: a missing check, an expensive tool call, an instruction that changed nothing. It files each finding as a retro issue. Those issues enter the queue like any other issue, so triage picks them up and Patchmill can fix its own environment the same way it fixes your code. A problem that slows down one run becomes the fix that speeds up the next.

Interactive runs offer a Retro at the end, and the agent asks before it files anything. Unattended runs close the loop on their own once you set retro.unattended to "file-issues".

Patchmill 1.3 also judges an unattended session by its progress, not by the clock. Before, every phase session stopped after 90 minutes, even when the agent was still doing useful work. Now Patchmill watches the session and its subagents. When nothing happens for 10 minutes, it stops the turn and asks the agent to try another way, in the same session. After three Stalls, the Run attempt stops with Needs Info and keeps the work. The wall-clock limit is now an optional Session cap, and it is off by default.

You can also decide which issue runs next. An optional Selection skill ranks the issues that can start. The example skill in the pack ranks by milestone due date, then by priority label, then by age.

The rest of the release stops Patchmill from taking work that it can't move forward. Automatic selection skips issues that wait for a planning pull request to merge, and triage skips issues that already have a pull request. It also finds merged pull requests on Forgejo again, and the cost report now names the models of subagents.

Read the upgrade notes at the end. A configuration that patchmill init wrote earlier still has a 90-minute cap, and that cap now also limits subagents.

Retros: a factory that improves itself

A Retro reviews an Issue run after it ends, finds what got in the agent's way, and turns it into work that Patchmill can do. (#437)

  • The loop closes. A Retro files its findings as retro issues, or comments on a matching one, so the same problem doesn't get filed twice. Filed issues get the retro label and no workflow label, so normal triage picks them up. From there, Patchmill plans and fixes them like any other issue: a missing check gets added, a skill gets clearer, a slow tool call gets replaced. Each run that hits a problem leaves a fix for the runs after it.
  • It sees the whole run. The Retro reads the phase, subagent, and Console sessions of the run, and the run records, so it finds problems that no single session shows.
  • When it runs. An Issue run ends when its implementation pull request merges, or when a Run attempt stops with Needs Info. A ready pull request, a gate wait, or a pause is not an end. Each end gets at most one Retro, and it covers only the Run attempts that no earlier Retro covered.
  • Interactive runs ask first. At the end of an Interactive Issue run, the console offers Run retro or Skip. The agent shows its findings and asks before it files or comments on each issue. A Web session stays open after the offer until the Retro is done.
  • Unattended runs opt in. Set retro.unattended to "file-issues" to file issues without a human, or to "findings-only" to write findings and make no host writes. The default is "off".
  • It never changes the result. A Retro doesn't change the outcome, labels, or comments of the source issue, and a failed Retro only logs a warning. Findings go to <runsDir>/issue-N/retros/<id>/findings.md.

The new managed skill patchmill-retro is adapted from Matt Pocock's retro skill. Point skills.retro at your own copy to change what it looks for.

Progress-based limits for unattended sessions

Unattended planning and implementation sessions now stop when they stall, not when a timer runs out. (#427, #429)

  • A Stall is quiet time. A session is quiet when its session file and the session files of its subagents stop growing and no model output streams. A bash call that is still inside its command timeout doesn't count as quiet. After pi.stallStopMinutes (default 10) of quiet time, Patchmill stops the turn and sends a recovery prompt in the same Pi process. If Pi doesn't answer within 30 seconds, Patchmill restarts it on the same session. (#427)
  • Repeated Stalls stop the attempt. A Command timeout counts as a Stall too. The pi.maxStalls-th Stall (default 3), or a second Stall of the same command, stops the Run attempt with Needs Info. The comment lists each Stall and what the agent tried. The branch, the work, and the pull request stay. The next attempt gets the stalled commands under "Previous stalls", so it doesn't repeat them. (#427)
  • Planning gets the same watch. The Stall policy covers unattended planning and implementation. Interactive runs get no Stall policy. (#429)
  • No wall clock by default. pi.timeoutMinutes is now an optional Session cap, and its default is null. With a cap, the agent gets a message 5 minutes before the end that tells it to start no new work and hand off. Subagents get the same cap. Without a cap, they get the longest deadline that pi-subagents accepts. Triage has no Stall policy, so a triage session still stops after 90 minutes when no cap is set. (#429)
  • Nothing outlives Pi. When Patchmill stops, aborts, or times out a Pi session, it now also kills the process groups of Pi's child processes. A stuck command or a detached subagent runner no longer keeps running after Pi. (#427)

Choose the next issue with a Selection skill

Set skills.selection to a skill, and automatic selection in run-once, patchmill run, and the interactive start asks it which issue goes next. (#452)

  • Patchmill still decides what can start. Dependencies, planning gates, and runs that another clone holds work as before, and In Progress issues still come before Ready ones. The skill only orders the issues that are left, and only when there are at least two.
  • It falls back to oldest first. If the skill fails or returns no usable order, Patchmill prints Selection skill failed: <reason>; using oldest first. The ranking session runs read-only, for at most 15 minutes, or pi.timeoutMinutes when that is shorter.
  • It tells you why. run-once --dry-run shows a Selection row with the reason. A real run logs Selected issue #N: <reason>.
  • An example to copy. The new skill patchmill-issue-selection ranks by the due date of an open milestone, then by priority:critical, priority:high, priority:medium, and priority:low, then by age. Use it as it is, or copy it and change the order.

With the default, null, selection stays oldest first.

Selection, triage, hosts, and cost

  • Selection skips planning waits. Automatic selection now skips an issue whose open planning pull request waits for review, prints Warning: Issue #N: planning pull request #M is waiting for review; skipping it., and takes the next one. Before, an older waiting issue was taken on every pass, and the ready issues behind it never ran. run-once --issue N still runs the named issue and reports the wait. (#428)
  • Triage skips issues that are being worked on. Triage now skips every issue with an open pull request from one of its agent/issue-N branches. Before, triage could move such an issue to ready again. The skip also applies to Needs Info issues with a trusted reply, so relabel those by hand. (#444)
  • Forgejo finds merged pull requests after the branch is gone. When a merged pull request's head branch was deleted, Forgejo reports the head as refs/pull/N/head, and Patchmill didn't find the pull request. A run then stopped at the planning gate with Needs Info. If you pushed a planning branch with another slug to get past this, delete that branch, and the next run finds the merged pull request. (#443)
  • The cost report names subagent models. In the run-cost table of a pull request, each subagent's usage now appears under its own model instead of "Unknown model", and each child counts once. Before, a child could count up to four times. Usage that Pi recorded at a zero price, for example from a subscription-billed model, now shows as Unpriced instead of $0.0000. A sum that leaves such usage out shows as $x (partial). The web issue page uses the same text. (#423)

The docs have a new Factory floor page. It shows each station that an issue passes through on its way to a merged pull request, and the code or skill that runs it. (#426)

Upgrade notes

  • Remove the old 90-minute cap. patchmill init used to write "timeoutMinutes": 90. That value still works as a Session cap, and it now also limits subagents. To rely on the Stall policy alone, set pi.timeoutMinutes to null or remove the key. (#429)
  • Patchmill owns two subagent settings. Before each session, Patchmill writes timeoutMs and checkpointBeforeDeadlineMs in <agentDir>/extensions/subagent/config.json and replaces your values for them. It keeps the other keys. While that file has checkpointBeforeDeadlineMs, an invalid value of another key stops pi-subagents from loading. (#429)
  • Stopped sessions kill their children. When an unattended session is stopped, aborted, or times out, Patchmill sends SIGKILL to the process groups of Pi's child processes, including background subagent runners. (#427)
  • Stall comments quote commands. A Stall stop comment names the stalled command, cut to 200 characters, in a public issue comment. (#427)
  • Unattended Retros can write to the host. With retro.unattended: "file-issues", an unattended agent session may create issues, comment on retro issues, and create the retro label without a human. The default, "off", makes no host writes. (#437)
  • Triage needs the pull request list. If the host can't return the open pull requests, patchmill triage exits with code 1, and patchmill run logs triage failed and continues. (#444)
  • Automatic passes don't retry a gate-wait comment. If a gate-wait status or comment fails to publish, only run-once --issue N tries again. (#428)
  • Run patchmill skills update to install the new patchmill-retro and patchmill-issue-selection skills.
  • Configuration and saved state from 1.2 work as they are. All new settings are optional.

Dependencies

  • Pi runtime packages are now 1.7.0. (#441)
  • pi-subagents is now 0.90.0. (#442)