DEV Community

Discussion on: Your Claude Code Batches Don't Have to Wait for Each Other

Collapse
 
itskondrat profile image
Mykola Kondratiuk

I tried this pattern and the merge conflicts got gnarly fast. parallel branches sound clean but when each AI session has different assumptions about shared state, you end up with more cleanup than you saved.

Collapse
 
edwardkubiak profile image
Edward Kubiak

Great point — this is the #1 concern people raise. The trick is that cast-parallel doesn't just fork two Claude sessions and pray.

The merge conflict problem gets solved at the planning layer, not the git layer. cast-parallel reads a structured JSON plan (Agent Dispatch Manifest) that explicitly defines which batches of work go to each stream — batches designed to touch non-overlapping files. Each stream gets its own git worktree, its own branch, its own batch list. The agents aren't freelancing — they're executing a pre-split plan where file boundaries were already considered.

And if a conflict does happen anyway, there's no auto-resolve. It exits 1 and preserves both worktrees for manual inspection.

Without that upstream planning step, yeah — parallel branches are a pain. With it, the merge is mechanical because the work was designed not to overlap.

Collapse
 
itskondrat profile image
Mykola Kondratiuk

the manifest as a pre-commit contract - that framing makes a lot of sense. agents declare territory upfront rather than fighting over files at merge time. i was solving this at the git layer and it was a mess. planning layer is obviously the right place.