Skip to content

AGENTS.md: make "push a WIP commit before any minutes-long step" an ordering rule — the one lesson from the 2026-08-25 restart that is not already covered #12024

Description

@os-steve

Filed unassigned, recording only.

A container restart on 2026-08-25 killed five in-flight os-dev agents. Four of tonight's five lessons turned out to be instances of rules the repo already has, and are recorded as findings rather than as new doctrine. This card is the one that is genuinely missing.

The gap, measured

AGENTS.md carries no rule about committing before a long-running step. Verified with a working control:

grep -niE 'commit before|before you wait|wip commit|push.*before' AGENTS.md → 0 hits
grep -ncE 'git stash' AGENTS.md → 2 hits (control: the grep works)

The nearest thing that exists is #11463, whose framing is parking: an agent that decides to wait should commit first. The restart showed that framing is too narrow — the rule has nothing to do with parking.

What the restart measured

cardran forcommitted?outcome
#11694~14 minnobranch pushed empty (0 commits ahead), worktree clean — total loss
#11942~14 minnobranch pushed empty, worktree clean — total loss
#11525hoursno2081 lines uncommitted — a 1194-line gate, an 864-line baseline, lint.yml +22, package.json +1
#9165 step 2hoursnoscratch instruments survived on disk; the analysis died with the context
#9298hoursn/aworktree clean, nothing to recover

Only luck saved #11525: the worktrees outlived the processes, so a rescue dispatch could commit and push the work (f7e038cda). This environment documents that it reclaims the filesystem — so that luck is not repeatable.

⭐ Why the current phrasing cannot reach the agents that need it

The cost of not committing is inversely related to how well the agent is behaving. An agent that finishes fast commits soon and risks little. An agent deep in a hard card — measuring, ablating, re-deriving — defers committing because it is not done yet, and so accumulates the largest uncommitted surface exactly where the work is most expensive to reproduce. #11694 and #11942 lost 14 minutes each. #11525 lost hours because it was doing the card properly.

So the population that most needs the rule is the population least likely to be reached by it: "commit before you wait" does not fire for an agent that is not waiting — it is working.

The proposed rule

Change the trigger from "before you wait" to "before anything that is not the next edit" — before a build, a full test run, a gate sweep, an ablation, any step measured in minutes.

Push a WIP commit before every step that takes minutes — a build, a full test run, a gate sweep. Not because you are about to wait: because you are about to stop being the only copy.

#11463 already establishes that ordering rules are the instructable kind (do-not-end-the-turn survived three escalating strengths; commit-before-you-wait did not need to). Tonight's rescue is a second confirmation: told "commit and push before reading anything else," the agent did exactly that, and 2081 lines were safe on origin before it began verifying anything.

⚠️ The cost, measured — this needs paying for, not just writing

AGENTS.md is 1149 lines against a ceiling of 1149 — headroom 0, and scripts/pm/check-skill-line-ratchet.mjs is shrink-only: raising a ceiling "requires a maintainer ruling quoted in the raising PR's body" and wants "its own card".

So this is not a one-line edit. Two routes, and the first is preferred:

  1. Pay by in-place compression — the established idiom in this repo (see PR review-checklist: add the git-first spot-check row, paid by in-place compression #11987, "…paid by in-place compression"). Preferred: it keeps the ratchet honest and needs no ruling.
  2. If compression cannot pay for it, this needs a ceiling ruling and should be re-labelled needs-user-decision rather than raising the ceiling quietly.

⚠️ Note that #11910 is an open, unresolved decision about this same ceiling family. Whoever takes this card should read it first — the two may want deciding together rather than separately.

Deliberately NOT filed as cards — already covered

Recording these so nobody re-files them as new doctrine. Each is a worked example of a rule the repo already has, and paying compression to restate an existing rule is negative value:

Related

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions