Urgent.News

What's breaking now, across thousands of outlets.

Tech

Show HN: Foremerge – Catch Intent Conflicts Between Parallel Coding Agents

Foremerge is an open-source coordination protocol for coding agents, built atop Git. Agents maintain isolated worktrees while sharing intent, semantic claims, dependencies, provisional ChangeSets, decisions, validation, and provenance. The current version, Foremerge 0.5.0, is a pre-1.0, local-first MVP. It includes a CLI, JSON API, MCP server, SQLite store, deterministic conflict detector, and verification-gated lifecycle.

Public schemas may change in future releases. The project does not address coordination between machines, focusing instead on intra-repository collaboration.

Consider a scenario with two AI agents working concurrently on the same project. Each agent operates within its own copy of the codebase to prevent conflicts. After completion, both agents produce correct output. However, a problem arises – one agent removed functionality that the other depended on. Git cannot detect this issue, as it compares textual changes rather than semantic intent. If two agents modify non-overlapping parts of code, Git will merge them without warning, resulting in stranded work.

Foremerge addresses this by allowing agents to announce their intentions before implementing them. Similar to a shared whiteboard, agents write down what they plan to work on and review the plans of others. Two key points: Foremerge does not lock files or block agents, as this would stall the entire system. Also, it does not ask models to resolve conflicts, ensuring consistent results across runs.

Foremerge compares declared plans before any code is written, raising an advisory if conflicts arise. For example, if one agent plans to replace a PaymentService with a new implementation while another intends to extend it, Foremerge will issue a HIGH advisory and suggest using a stable abstraction like PaymentProvider. This recommendation is evidence, not a directive.

Foremerge operates above Git, providing shared awareness without replacing it. The repository remains the durable storage layer, while Foremerge supplies the missing coordination layer. To set up Foremerge, install the prebuilt release binary for macOS or Linux, or follow the instructions for building from source using Rust. Once installed, you can use the binary named 'foremerge' or 'fmg' interchangeably.

Register the MCP server, enable it, and the system will prompt for confirmation before proceeding. With these steps, Foremerge enables seamless coordination between coding agents, minimizing conflicts and enhancing collaboration.

Written by urgent.news from Hacker News's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at github.com →

More in Tech

More from Monday 21 September →