HN CompanionHN Companion new | best | ask | show | jobs
Show HN: I built Clash to avoid conflicts when running AI agents in parallel (github.com/clash-sh)
1 point by matk9 5 hours ago | discuss
Hey HN,

I made Clash, an open-source cli tool that helps you/your coding agent manage merge conflicts that occur during parallel development on the same repository.

Example: Two agents working on different features both modify src/main.rs. Clash shows you this conflict immediately and not after lots of time and tokens spent during the merge time.

It is a simple tool that your agent can use as part of the development process to check if the commits agents make are conflicting with any other worktrees in the repo. This helps pre-emptively capture merge conflicts before feature completion and helps make the merging together of different features into main branch much easier.

Unlike git, which only shows conflicts at merge time, Clash detects conflicts between all active worktrees during development. It's 100% read-only & never modifies your git repo and outputs JSON so agents can adapt their approach before wasting time.

With all of us moving to a world of Managing coding agents rather than being a coding agent themselves, we would be working on multiple different features & bug fixes which unlocks the new ability to have merge conflicts with ourselves.

The vision with clash is to be a tool, that help coordinate internal agents amongst themselves.

  Example workflow:
  - Agent 1 commits changes to src/main.rs in worktree A
  - Agent 2 commits changes to src/main.rs in worktree B
  - Both run `clash status --json` after committing
  - They see the conflict and coordinate to avoid incompatible changes
To better showcase the clash in action, we have added a number of gifs on Clash in action in the github repo.

I’d be interested in feedback on how this tool would fit into your workflow & any general thoughts you have in this area. Try it out and let me know how it performs on your end. Install Instructions available in the readme.

This is Mathew, Thanks for reading!



No comments yet.