Saw #15: agentrail, Correcting the Record Agentrail-rs PR #3 adds three commands to the agentrail tool — `close`, `edit` and `reserve`/`unreserve` — plus a cursor fix and a new report, after the saga on the X_eTaL typed array language grew to 150 steps and drifted from git history. The drift came from work finished in another repository (steps 101 to 104 in X_eTaL-libraries), five steps done in a parallel lane and merged in one pull request, and step 111's prompt describing a `cr"..."` form later dropped from the design. The author rejected the existing `reopen`-then-`complete` route because a test on a copy of the saga showed step 100 picking up a new timestamp and an unrelated commit, and fixed a second bug where `complete` advanced the cursor onto already-finished work. Saw 15: agentrail, Correcting the Record 3129 words • 16 min read • Abstract | Resource | Link | |---|---| | The change | agentrail-rs PR 3 https://github.com/sw-vibe-coding/agentrail-rs/pull/3 — close, edit, reserve; the cursor skips finished work | | The tool | agentrail-rs https://github.com/sw-vibe-coding/agentrail-rs | | Earlier | Saw 3: agentrail-rs https://blog.softwarewrighter.com/2026/03/22/saw-agentrail-rs-icrl-dual-memory/ · AI Tools 2: insert, reorder, reopen https://blog.softwarewrighter.com/2026/04/23/ai-tools-agentrail-rs-mid-saga-flexibility/ | | Comments | Discord https://discord.com/invite/Ctzk5uHggZ | The saga, and its cursor An agent starts every session with agentrail next , marks the step begin , does the work, commits, and runs agentrail complete . That records the commit, a summary and a trajectory, then moves the cursor to the next step. The saga is a record of the git history, and the next session trusts it. That model assumes the work happens in order, here, by the agent holding the cursor. How the record drifted On X eTaL, the typed array language this blog’s Array Languages series follows, the saga had grown to 150 steps, and three things had happened to it: 1. Work moved to another repository. Four steps of the equation work, 101 to 104, were finished in X eTaL-libraries after the library moved there. In X eTaL’s saga they were still pending , and the cursor had moved on to 111. 2. Work was done in a parallel lane. Five steps of readable error messages were done in a lane with its own saga and merged in one pull request. The main saga still listed them as pending , ahead of the cursor. 3. The plan changed after a step was written. Step 111’s prompt described a raw form of the new code strings, cr"..." , that was later dropped from the design. None of that is unusual once several agents share a project. Each one is a step whose record no longer matches the history. Why the existing commands could not fix it agentrail already had commands for changing the plan mid-saga, insert , reorder and reopen , all of which protect completed steps. That is right, because completed steps anchor the git history. But the protection also boxed in the stranded steps: - reorder 101 --to 111 refuses, because steps 105 to 110 between them are completed, and completed steps never renumber. - reopen 100 , then complete , moves the cursor to 101, but it rewrites step 100’s completion time to today and appends today’s commit to step 100’s record. Completing 101 then credits X eTaL’s latest commit with work that lives in another repository. It corrupts two records to fix one. - Hand-editing a step’s file is forbidden by the project’s own rules, and rightly: the saga is append-only state, and a hand edit is how the record and the history drift apart silently. The reopen route was tried first on a copy of the saga, and the result diffed: step 100 picked up a new timestamp and an unrelated commit. That was enough to decide that the tool, not the saga, needed fixing. And there was a second bug in the same place: complete advanced to the step after the current one whether or not that step was already done, so the cursor could land on finished work. What changed Three commands, one fix to the cursor, and one new report. | Command | What it is for | |---|---| | agentrail close N --summary S --commit REF … \\| --elsewhere WHERE | complete one step out of order, recording where the work is | | agentrail edit N --prompt P | replace the prompt of a step not yet done | | agentrail reserve N --for OWNER / unreserve N | hand a step to someone else before the work starts | close : a step done elsewhere agentrail close 101 --summary "Spatial oracle, done in the libraries repo" \ --elsewhere "X eTaL-libraries@0f82f93" agentrail close 126 --summary "Readable errors, lane readable" \ --commit 7c1e0a2 a commit in this repository close marks a pending, in-progress or blocked step completed, out of order, and makes the agent say where the work is: --commit , repeatable, for commits in this repository, resolved to full SHAs so agentrail audit can match them; or --elsewhere for anything else, stored with the step as done elsewhere . Passing neither is an error. close never records the current commit on its own and never touches another step. If the closed step is the current one, the cursor moves on. edit : a step whose plan changed agentrail edit 111 --prompt docs/code-strings-step-111.md This replaces the prompt and the description status shows. A completed step’s prompt is history, so edit refuses one; reopen it first. reserve : preventing the drift agentrail reserve 111 --for "cloud agent, PR to follow" ... later, after merging their PR: agentrail close 111 --summary "Code strings" --commit