Foremerge records what each coding agent plans to change before it edits anything, and raises a finding when two plans cannot both be true. That only works if the record is current. Version 0.6.0 fixes the way it was not.
Agents stop without saying goodbye
An agent session ends without closing its intent far more often than you would guess. A context window fills up. A laptop lid closes. A scheduled run reaches the end of its slot. The intent the agent published stays open, its claims expire, and nobody closes it.
Foremerge treated that abandoned work as live. Every later intent on the same files was compared against it, and each comparison that found something was recorded. One of our own repositories, where scheduled agents and interactive sessions share a single coordination store, reached 3,896 open conflicts, 98% of them with no live agent on either side. A new intent on a busy file opened with about 40 recorded against it, and the ones worth reading were buried in the ones that were not.
This is a problem you only get from running several agents at once over a long period. One agent, one session, and the record stays tidy by accident.
What 0.6.0 changes
- A finding below HIGH against work whose agent has stopped is no longer recorded. An intent counts as stopped under the same test
work adoptalready applied: it sits inINTENT,CLAIMED,IN_PROGRESSorPROVISIONAL, it holds no live claim, and its agent has made no call that writes to the record for two hours (reads and validation runs do not count). - Stopped work is still listed in
related_work, last, marked withowner_stopped_since, and needs no assessment. Another agent can see it there and adopt it. A what-ifcheck_conflictsapplies the same rule and names what it left out understopped_work. - If the agent was only quiet, its next call, an adoption of its work, or a check that validates it records the findings that were skipped in the meantime, unless the other agent has gone quiet too. Pairs already on record are left alone, settled or not. If the agent never returns, those findings are never recorded. The stopped work stays listed in related_work, but nothing requires anyone to act on it. This leans on severity: everything below HIGH counts as safe to skip, so a finding rated too low goes with the rest.
- The agent skill and the
discard_workdescription now tell an agent to close its intent before it stops. Work that reached Git without going through acceptance, because no named check is registered or a maintainer committed a batch by hand, can be closed withforemerge work discard --landed REF.
Why HIGH findings are still recorded
HIGH findings gate acceptance, and an agent that was only quiet must not lose that protection. So the gate is unchanged. A stopped intent whose declared plan genuinely contradicts yours still asserts, and you still have to deal with it before your ChangeSet is accepted. The rule only removes the advisory noise underneath that line.
What you see now
Before, a new intent on a crowded file came back with a long list of recorded conflicts, most of them against intents whose agents had been gone for days, and nothing in the list told you which was which. Now the same intent comes back with the live findings only. The stopped work is still there at the end of related_work, each entry carrying owner_stopped_since with the time its agent went quiet, so you can see what was set aside and pick it up if it is worth finishing.
Conflicts already on record are not touched by the upgrade. To clear a backlog like ours, close the stopped intents.
The migration change
Foremerge used to migrate a ledger's schema as a side effect of opening it, and every command opens the ledger, including the ones that only read. A status run by a newer binary from the wrong directory migrated a real repository's shared coordination store and locked every older client out of it.
Foremerge no longer migrates on open. A command that meets an older ledger refuses it with MIGRATION_REQUIRED and leaves the file exactly as it was. foremerge ledger migrate does the migration and nothing else does: it refuses to run while another process has the ledger open, copies the ledger with its WAL contents into a timestamped backup directory, checks the copy's integrity, migrates, and prints how to roll back. Without --yes it only reports what it would do.
The schema itself has not changed since 0.4.0, so upgrading from any 0.4.x or 0.5.x build needs no migration and both versions read the same store. Only a ledger last opened by 0.3.x needs the step. This is why 0.6.0 is a minor version rather than a patch.
Installing it
curl -fsSL https://foremerge.com/install.sh | sh
That installs a checksum-verified release binary on macOS and Linux. On npm, which also covers Windows x64:
npm install -g foremerge
The full list of changes is in the 0.6.0 release notes.
The general lesson
If you are building coordination for agents, the failure mode to design for is not the agent that disagrees with another agent. It is the agent that never comes back. Human collaborators close their tickets, eventually, because somebody asks them to. An agent whose process exited has no such pressure, and a store that assumes otherwise will slowly fill with work that nobody is doing and nobody will ever withdraw.
Top comments (10)
98% of conflicts with no live agent on either side is a brutal number. two hours of quiet seems like a sane cutoff, have you hit cases where an agent is legit idle longer than that though? like a long test run or waiting on someone to review
It can happen, and the rule expects it. Two hours of quiet isn’t enough on its own. The intent also has to hold no live claim. So a long test run is covered if the agent takes a lease longer than the run. The default is one hour and the maximum is 24.
Waiting on review is the weaker case. Once the lease runs out and the agent has been quiet for two hours, it counts as stopped, even if the branch is real and just sitting in review. Findings below HIGH against it stop being recorded, but it’s still listed in related_work, and HIGH findings still record and gate acceptance. Its next call records what was skipped, so the cost is a delay rather than a loss. The part I’d watch is that another agent sees that work as stopped during the wait and could adopt it.
got it, so the lease length is the real lever. the review wait case still feels sharp though. if another agent adopts while the PR is sitting there, does the original opener get pinged, or is it just something you notice later in related_work
Partly, work can’t be adopted while it holds a live claim, but once the agent publishes for review it can’t renew that claim, so the lease only covers what was left of it at publish, 24 hours at most. What protects work in review is a passing check: validated work isn’t treated as stopped and can’t be adopted at all. The gap is published work that hasn’t passed a check yet.
On the ping: no, nothing is sent right now. The handover is written to the event log with the previous owner, the new owner and the adopter’s reason, but nothing pushes that to the original agent or to whoever is watching the PR. The original agent finds out the next time it touches that work, because claims and publishes on an intent it no longer owns are refused. A person waiting on the review would only see it by looking, or by leaving foremerge work watch running, which prints every event as it happens.
The better fix is for it not to happen so work waiting on a person shouldn’t count as stopped, which is the “finished, waiting on a person” state I mentioned further down. But when an agent that really did die after opening a PR it still needs someone to take it over, so a ping is worth having too. My first thought is a comment on the PR itself, since the person reviewing is the one who needs to know, and the original agent is usually gone by then. Where would you want it?
pr comment for the reviewer feels right. the original agent still needs a spot it can see on next wake though, or it keeps thinking it owns the intent. and yeah waiting on a person shouldn't look like stopped
Agreed on both. Today the original agent only learns it at the refusal, when its next claim or publish on that intent is turned down, so that refusal is the spot I'd use: carry the handover from the event log with it, who took the work and the adopter's reason, so it knows on wake instead of guessing.
The idle case openpod raises looks to me like a symptom of a ranking problem, and I don't think a different constant fixes it. Call recency measures how often an agent's scheduler wakes it up. An agent on a short keepalive loop stays live forever while doing nothing of consequence, and one long unit of real work reads as stopped.
I ran your exact two-hour test against a signed append-only ledger I operate (124,214 rows, 66 signing keys). Of 1,942 delivery rows, 918 were signed by a key that had been completely silent for more than two hours immediately before it delivered. That is 47.3%. The longest pre-delivery silence was 95,155 seconds. The test would have called those signers stopped at the moment they produced the work.
Decomposing it honestly, 874 of those come from one heavy key with 1,814 deliveries. It reproduces on a second independent key, 44 of 51, while two other keys with 47 and 23 deliveries show zero, so what it tracks is how each agent happens to be driven. The scheduler is visible in the gap distribution itself: one key has 6,165 inter-event gaps at exactly 600 seconds and 5,758 at 660, and the two heaviest keys have their single largest mode at a gap of zero, 14,652 and 14,524 same-second gaps, because they emit in bursts. Whichever key looks freshest at a given instant is the one with the shortest configured interval. My agents are timer-driven services, so the shape of my silences is not the shape of an interactive session, and a delivery row is not an open intent.
Second thing. You write that nothing is lost because the next call, an adoption, or a validating check will record the skipped findings. For the 98% with no live agent on either side, that next call is exactly what never arrives. Those advisory findings get dropped rather than deferred, and what remains is the HIGH gate, whose boundary is drawn by the same severity classifier you are now trusting to decide what is safe to suppress. That makes the suppression load-bearing on severity calibration, which the post doesn't say.
My own ledger has the uglier version of this. Its signed vocabulary contains no typed withdrawal row at all, no release or cancel name, so "unresolved" is not a state anything can be in. What the public surface did instead was report expiry by failing a join: tasks read as timed out while a signed passing verdict for them sat in the same thread, because the delivery row did not carry the pointer the evaluator required. So I rate
discard_work --landed REFabove what I built. A typed close leaves a row, and a row survives the process exit. An inferred stop gets recomputed by whoever reads next, so it moves when the reader's clock moves.One measurement you can take without new instrumentation: for every intent that eventually produced a ChangeSet, the gap between that agent's preceding Foremerge call and the call that landed the work. Any mass above two hours is work that was live and had its findings suppressed.
Thanks for the detailed reply and for running that test!
You're right, and the post claimed too much. "Nothing is lost" is only true if the agent comes back. If it never does, that warning is gone for good. The plan stays listed for other agents, but nothing makes them act on it. I corrected that line in the article.
I also ran your test on the repo from the post. 200 plans got as far as a published ChangeSet, and only 3 had more than two hours of silence just before it. That's far from your 47%, but these are mostly short sessions, not timer-driven services like yours, and work that never got that far isn't counted.
That repo was on 0.5.1 until today, which keeps every warning, so I could check what 0.6.0 would have done to its history:
It would skip 4,073 of 10,640 warnings, and 3,712 of those would never come back.
Agents had already reviewed most of those, and almost always decided there was no problem. Only 17 of 2,258 reviews said otherwise. That's the agents judgement though, not proof.
Only 31 of the 10,640 were HIGH findings serious enough to block work. Agents called a pair a real conflict or a duplicate 32 times, and 22 of those only had lower-level warnings. So you're right that the severity line carries a lot of weight.
The result I like least: 43% of the lost warnings were about finished work waiting on a person, not abandoned plans. Silence can't tell those apart.
The changes I think would work:
I don't have a fix for the severity line yet. I'd want better false-positive numbers before moving it. We have been working on finalizing our benchmarks before we release 1.0 so hopefully that will lead us in the right direction.
Would you be up for opening this as a GitHub Discussion? github.com/naw103/foremerge/discus...
If you'd rather not, are you ok with me pasting your comment there and linking back to you? Timer-driven agents are the case my own repos can't test right now, so your input would help and we will also add that into the benchmarking.
Thanks again!
One gap 0.6.0 leaves open is that whoever picks up stopped work sees what the agent declared and when it went quiet, but not why it stopped. “Ran out of time” and “hit a wall” look the same, and they call for different next steps. Someone on Bluesky pointed this out after the release, and we don’t record it yet.
The catch is that a crashed agent can’t write a last note. If you run agents unattended, how do you tell those two cases apart today? A note the agent keeps updating as it goes, or the last error in its session log?
On telling a timeout from a wall: the session log usually holds the difference already, in its last stretch rather than in its last line. An agent that ran out of time was still advancing when it stopped, with new files touched, new steps reached and its last calls different from each other. An agent that hit a wall repeats itself before it stops, the same call or the same failing check two or three times, often with the same error.
Counting repeats in the last ten or twenty calls separates the two cases without the agent writing anything at the end, which matters because, as you say, a crashed agent cannot. A progress note still helps with what the agent meant to do next, but the repeat count is what tells the adopter whether to continue or to change approach.