---
id: toolbench-005
stream: toolbench
title: One builder per checkout
earned: 2026-08-02
window: Inches
source: RULINGS.md@2026-08-02#d8d368b3
published: 2026-11-18
---

# One builder per checkout

Two automated helpers were pointed at the same folder. The first had worked for an hour: files changed, nothing committed, the ordinary state of work in progress. The second started up and did something reasonable for a fresh session — restored the tree to a known-good state — and the hour was no longer there.

No error. No merge conflict, nothing to resolve. The folder simply came back clean.

The mechanism is version-control reality that everyone knows and few carry into their tooling: **the protection git offers is a function of what you have recorded.** Committed work is durable in the ordinary case and recoverable in most of the rest. Uncommitted work is unversioned by definition — it exists in exactly one place, and any process with write access can remove it while doing something entirely legitimate. The whole risk sits in the window between a change existing and a change being recorded, and every extra parallel helper aimed at that folder widens the window with someone else's routine, on someone else's schedule.

But be precise about "gone," because the first draft of this card wasn't, and telling someone mid-incident that their work is unrecoverable is worse than useless. **Check before you conclude.** `git checkout`, `restore`, and `reset --hard` do not delete untracked files — only `git clean` does. Anything ever `git add`-ed is in the object store and reachable via `git fsck --lost-found`. Editor local history (JetBrains, the VS Code timeline) routinely recovers exactly this scenario. And in the other direction: commits are not immortal either — `reset --hard`, `branch -D`, a force-push or a fresh clone will all remove them from view, with the reflog as the recovery path for a while. The honest sentence about that hour is not "it was gone." It is *nobody looked* — and the reflog, the file timestamps, and the second agent's own transcript all recorded the restore, which makes "no artifact of its occurrence" false too. There was evidence. There was no one reading it.

The prevention is structural and cheap: **one builder per working tree.** A second agent aimed at a busy repository either waits for the first to land, or takes its own isolated worktree — which removes the class rather than managing it.

And a caution the first draft got backwards. "Commit early and often" is right for an isolated tree and hazardous in a shared one: an agent running `git add -A` in a folder another agent is working in will sweep that agent's in-flight edits into its own commit, interleave two unrelated changesets, and fight for the index lock. In shared trees, commit with **explicit paths only** — your files, named.

```
Install block — for your assistant's instruction file:

- One builder per working tree. If another agent or session is
  mid-task in a checkout, take an isolated worktree or wait.
- Commit early and often — but in a shared tree, commit with
  EXPLICIT PATHS, never `git add -A`, which sweeps up another
  agent's uncommitted work.
- Before any restore, reset, clean, or checkout in a shared
  folder: check for uncommitted changes you did not make, and
  preserve them first.
- Never tell someone their work is lost before checking the
  recovery paths — untracked files survive checkout/reset,
  `git fsck --lost-found` finds added objects, the reflog holds
  removed commits, and editors keep local history.
```

Published by Kelly Smith. Errors in this card belong to Inches.
