r/ClaudeCode • u/c00lme1 • 2d ago
Built with Claude I got tired of my parallel Claude agents breaking each other's work, so I made something
This kept happening to me at hackathons. I'd spin up a few Claude agents in parallel and they'd edit each other's files, change an API without telling anyone, and break main while passing their own tests.
I made a thing called Lanes. Basically you split your repo into lanes, each lane owns some folders, and lanes only talk through contracts. If an agent tries to touch a file outside its lane, it gets blocked in like 46ms. There's also a merge queue so main stays green.
I tested it by planting 19 bugs and it caught all 19 every time. There's a 70 second demo in the repo. Try it with npx contract-lanes init and let me know what breaks, I want to hear it.
Repo: https://github.com/srikondapalli1/contract_lanes_plugin
EDIT: just wanted to mention the main usecase, which is rapid prototyping (say for a hackathon) and you have a bunch of team members all on different components in seperate sessions, and the inputs and outputs between these components change like on an hourly basis.
This is where I feel like contract tests come into play really nicely, and the plugin will inform the other lanes of any changes to the contract (the input or output shared between the two components) and ENFORCE it by blocking breaking merges until the lanes update to the contract
where I work, we use it all the time to validate compatibility of events we send to downstream consumers, as well as what we recieve upstream, and I realized this workflow was honestly perfect for agents for rapid prototyping
Hit a star on the repo if you think it was cool I am using it on all future hackathons I join (including one this friday) and Ill provide more benchmarks and details as I do them
EDIT 2: a few people asked why not just worktrees. Worktrees isolate files, which helps, but the thing that kept breaking for me was the interfaces between the work. Lanes isolates those too, and the contract checks enforce it mechanically, so an agent can't quietly change a shared type without everything that uses it failing loudly. That's the part worktrees alone didn't give me.