I kept losing hours to AI agents fighting over the same files, so I built a CLI to give each one its own workspace
For the last few months I've been using multiple AI coding agents at the same time -- Claude Code on one feature, Codex on another, sometimes Aider for a quick refactor. The promise is obvious: parallelize your work, ship faster.
The reality was me staring at a terminal at 11pm trying to untangle what happened when two agents both decided to rewrite the same utility file. One would finish, the other would finish on stale code, and git merge would hand me a pile of conflicts that neither agent understood. I'd spend more time cleaning up than I saved.
After the third time I lost an evening to this, I started building ruah.
The idea is dead simple: each task gets its own git worktree (so agents literally can't see each other's changes), and you declare which files each task owns up front. If two tasks claim the same file, ruah rejects it before anything runs. No more "I'll just be careful" -- the tool enforces the boundaries.
It also handles the merge sequencing. If task B depends on task A, ruah merges A first, then rebases B, then merges B. You describe the dependency graph in a markdown file and ruah executes it.
It works with any CLI agent -- Claude Code, Codex, Aider, Cursor, Windsurf, whatever. Zero runtime dependencies, MIT licensed, written in TypeScript.
I'm still actively working on it (v0.3.2 right now), so it's rough around some edges. But the core loop -- worktree isolation, file locking, DAG-based merge order -- has been solid for me.
What's the dumbest amount of time you've lost to a problem that should have been trivial? I need to feel less alone about my 11pm merge sessions.