You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Conflict forecast: predict merge conflicts between parallel worktrees before they happen #249
Inspired by Clash (open-source worktree-conflict predictor, found via Nimbalyst's worktree-tools survey).
With many agents editing the same repo in parallel worktrees, warn early when two active threads are touching the same functions/classes/files, before either merges. Show overlapping-edit hotspots on the Planboard or thread cards. Complements #163 (reactive merge-conflict agent) with a proactive signal.
How it works:git merge-tree --write-tree --name-only does a real dry-run 3-way merge between every pair of active worktree threads — no heuristic function/class parsing. Each thread's changed-file set is git diff --name-only <base>...<branch> unioned with its uncommitted git status --porcelain; pairs whose sets intersect become hotspots. overlap = files both threads touched, conflicts = the subset git says would actually collide.
Where it shows: a chip on thread cards in the Sidebar and Kanban (Kanban reuses ThreadCard) — red conflict when a pair really collides, amber overlap when they only share files, · N when a thread is in several pairs. Tooltip lists the other thread and up to four hotspot paths.
Not on the Planboard: those cards are GitHub issues, not threads.
Wiring:git:conflictForecast IPC channel, computed in electron/worktrees.js, memoized 15s per project. Renderer refetches when the thread list changes — no new polling loop.
Deliberately skipped: function/class-level granularity (file-level first; add if it proves noisy), cache invalidation on thread change (15s TTL instead), background refresher, merge-tree on uncommitted work (uncommitted edits contribute to overlap but can't be dry-run merged).
Tests: electron/test/conflict-forecast.test.js (4 cases incl. a real collision and an uncommitted-only overlap), test/conflictForecast.test.ts, test/conflictForecastBadge.test.tsx. Renderer suite 852/852; electron suite baseline-clean (the web-integration reconnect failure pre-exists on main, otel-runner is flaky under load and passes in isolation).
Research note (CodeScaleBench): code-graph find-references gives the STRUCTURAL version of conflict forecast — before dispatching, compute affected files/symbols, pre-scope the task, and flag collisions with in-flight threads. This also attacks the silent-killer failure mode they measured: partial completion (agent refactors 2 of 7 affected files).
Activity
currentbits commentedon Aug 17, 2026
Shipped on main (b8cb027).
How it works:
git merge-tree --write-tree --name-onlydoes a real dry-run 3-way merge between every pair of active worktree threads — no heuristic function/class parsing. Each thread's changed-file set isgit diff --name-only <base>...<branch>unioned with its uncommittedgit status --porcelain; pairs whose sets intersect become hotspots.overlap= files both threads touched,conflicts= the subset git says would actually collide.Where it shows: a chip on thread cards in the Sidebar and Kanban (Kanban reuses
ThreadCard) — redconflictwhen a pair really collides, amberoverlapwhen they only share files,· Nwhen a thread is in several pairs. Tooltip lists the other thread and up to four hotspot paths.Not on the Planboard: those cards are GitHub issues, not threads.
Wiring:
git:conflictForecastIPC channel, computed inelectron/worktrees.js, memoized 15s per project. Renderer refetches when the thread list changes — no new polling loop.Deliberately skipped: function/class-level granularity (file-level first; add if it proves noisy), cache invalidation on thread change (15s TTL instead), background refresher, merge-tree on uncommitted work (uncommitted edits contribute to
overlapbut can't be dry-run merged).Tests:
electron/test/conflict-forecast.test.js(4 cases incl. a real collision and an uncommitted-only overlap),test/conflictForecast.test.ts,test/conflictForecastBadge.test.tsx. Renderer suite 852/852; electron suite baseline-clean (theweb-integrationreconnect failure pre-exists on main,otel-runneris flaky under load and passes in isolation).Merge pull request #369 from currentbits/coder/conflict-forecast-pred…
currentbits commentedon Aug 17, 2026
Research note (CodeScaleBench): code-graph find-references gives the STRUCTURAL version of conflict forecast — before dispatching, compute affected files/symbols, pre-scope the task, and flag collisions with in-flight threads. This also attacks the silent-killer failure mode they measured: partial completion (agent refactors 2 of 7 affected files).
Conflict forecast: predict merge conflicts across worktrees (#249)
Conflict forecast: show overlap/conflict badges on thread cards (#249)