Back to browse
GitHub Repository

Avoid merge conflicts across git worktrees for parallel AI coding agents

60 starsRust

Clash – Detect Git worktree conflicts before parallel agent edits

by matk9·Feb 24, 2026·1 point·0 comments

AI Analysis

●●●BangerSolve My ProblemWizardryBig Brain

Early conflict detection via merge simulation—directly fixes Claude Code's worktree blindness problem.

Strengths
  • Solves a real, acute pain point Claude Code introduced—agents editing same files in isolation
  • Merge simulation approach is clever: read-only, fast, surfaces conflicts before they compound
  • Claude plugin integration means zero friction—works inside the agent's native environment
Weaknesses
  • Narrow audience: only valuable if running 3+ agents in parallel on overlapping code
  • Requires worktree setup and Claude plugin ecosystem; limited portability to other agent frameworks
Target Audience

Teams running multiple AI coding agents in parallel (Claude Code, Cursor, Codex) on shared codebases

Post Description

Claude Code recently added native worktree support (--worktree), which helps a lot with parallel agent isolation.

What's still unsolved is conflicts across active worktrees, which often surfaces late.

I built Clash (OSS, Rust) to detect potential conflicts earlier using read-only merge simulation across worktrees during edits.

- clash check <file> for pre-edit checks - clash status for a cross-worktree conflict matrix - clash watch for live monitoring - Claude plugin hook support for Write|Edit|MultiEdit

Quick setup (CLI + Claude plugin):

curl -fsSL https://clash.sh/install.sh | sh && \ (claude plugin marketplace add clash-sh/clash || true) && \ (claude plugin install clash@clash-sh || claude plugin update clash@clash-sh)

Would love feedback or your thoughts on this.

Similar Projects