· via Hacker News – Front Page (native)
Open-source Foremerge surfaces conflicting plans between parallel coding agents
A new open-source project shared on Hacker News gives parallel coding agents a shared, Git-backed registry of declared intent, flagging semantic collisions before any code is written.
A new open-source project called Foremerge, shared on Hacker News through its GitHub repository, targets a failure mode that version control cannot see: two AI coding agents whose changes merge cleanly yet undermine each other's goals. Version 0.5.0 is available now as a pre-1.0, local-first MVP.
The blind spot in Git
According to the project's README, Git compares text, not intent. It will block two edits that touch the same lines of the same file, but it cannot detect two edits in different files that are each reasonable in isolation and contradictory together.
The README illustrates this with a payments example: one agent migrates all callers to a new StripePaymentService while a second agent adds PayPal support to the old PaymentService. Nothing overlaps textually, so Git merges both without complaint, leaving the PayPal work attached to a class that nothing calls anymore. Both worktrees look correct; the work is still wasted.
A shared registry above Git
Foremerge sits above Git and asks each agent to announce what it plans to touch before it edits anything, expressed as semantic scopes — a target such as a specific function — rather than the code itself. Declarations are written to a small database inside the project's .git directory, so every agent on the machine, whether Claude Code, Codex or Cursor, reads the same picture while continuing to work in isolated worktrees. Beyond intent, the protocol lets agents share semantic claims, dependencies, provisional ChangeSets, decisions, validation results and provenance.
When two declared plans collide, Foremerge names both agents, explains why the plans clash and suggests how to divide the work — at a point where both worktrees are still clean and nothing has to be discarded. In the payments scenario, both agents declare the same PaymentService scope, one planning to replace it and one to extend it, and Foremerge raises a HIGH advisory suggesting they coordinate on a stable abstraction such as a PaymentProvider. The README stresses this is explainable evidence for a human decision, not an automatic architectural verdict or a hard lock.
Two limitations are deliberate. Foremerge never locks files or blocks an agent, because a single crashed agent would otherwise stall an entire fleet; warnings stay advisory and the operator stays in charge. And it never asks a language model to judge conflicts, so detection is deterministic — the same inputs always yield the same answer. Because the operation is declared up front rather than parsed from prose, differently worded plans that mean the same thing reach the same verdict.
Status and setup
The README lists what is implemented at 0.5.0: a CLI, a JSON API, an MCP server, a SQLite store, the deterministic conflict detector and a verification-gated lifecycle. Public schemas may still change, no benchmark results have been published, and coordination across machines is explicitly out of scope.
Setup can be delegated to the agent itself by pasting an instruction into Claude Code, Codex or Cursor, which handles installation and client wiring. Manual installation uses a curl-based script with checksum-verified binaries for macOS and Linux, or a build from source with Rust 1.85 or newer; Windows binaries are on the releases page. A recent Git and jq are required. Initialization writes coordination state under the Git common directory without touching tracked files, and the binary also answers to the shorter alias fmg.
Acceptance of work is gated on verification: Foremerge runs a registered check itself rather than taking an agent's word for completion. The README recommends a fast check that would genuinely catch a broken handoff, such as a build or typecheck, and notes the gate does not replace CI. Repositories with nothing meaningful to verify can declare an advisory policy instead, in which case accepted work is recorded as UNVERIFIED so the audit trail never implies a check ran. A doctor command verifies that registered checks can actually execute, which matters in agent worktrees because dependency directories are usually gitignored and git worktree add does not create them.
Why it matters
Running several agents against one repository is becoming a routine workflow, and the failure Foremerge addresses — merges that are textually clean but semantically destructive — is invisible to mainstream tooling. Its restrained design is notable: shared awareness without locks, without LLM arbitration and without replacing Git as the durable store. It remains an early, single-machine, unbenchmarked MVP, but it points at a plausible missing layer — declared-intent coordination — that multi-agent development may need as it scales.
- #git
- #coding-agents
- #open-source
- #developer-tools
- #ai