IA / Agents~85 · IA en attente
Running several Claude Code agents on one repo: branches hid the real conflict in all 5 runs, a shared directory fixed it, and the agents started messaging each other on their own
r/ClaudeAIu/jokiruiz1 octobre 2026
Analyse IA en cours de préparation : les informations ci-dessous proviennent de la détection automatique.
Résumé
Author here. This is an open-source (MIT) experiment, not a product. I wanted to know what happens when several Claude Code agents (Sonnet 5, effort high) work on the same repo at once, so I built a small lab: a room-booking API, 6 tasks, 37 acceptance tests and two pairs of tasks designed to collide by meaning rather…
Afficher le post originalMasquer le post original
Author here. This is an open-source (MIT) experiment, not a product. I wanted to know what happens when several Claude Code agents (Sonnet 5, effort high) work on the same repo at once, so I built a small lab: a room-booking API, 6 tasks, 37 acceptance tests and two pairs of tasks designed to collide by meaning rather than by file. One adds a TOTP second factor to login() while another adds a CSV export that calls the old login(); one renames a booking field while another filters on the old name.
What happened, by mode:
• Sequential, one agent after another: 30/37. The export agent refused to build an export that would skip the second factor, proposed the right fix and asked for confirmation, which never comes in non-interactive mode.
• One branch per task and a merge at the end: 31/37 in all 5 runs. Git flagged two textual conflicts in a test file, an agent resolved them, and /export still called login() without the OTP.
• Shared working directory: all 10 runs 37/37, with plain per-file locks or with my kernel, because the agents see each other's code and adapt.
The kernel (Médula) plugs in through Claude Code hooks: PreToolUse asks a fast decider whether each write collides with what the others are doing, and PostToolUse tells only the agents a change affects. Against per-file locks it costs the same ($1.65 per run), catches 6 of 6 real conflicts instead of 5, makes 0 unnecessary blocks instead of 5, and its run time is stable. The locks once made the login agent wait 453 s for the export agent, the wrong way round.
The part I didn't plan for: when the agents had a tool to message each other, they used it unprompted, and in one run the agent renaming the field warned the one filtering on it. Those tools are now disabled so the runs stay comparable, but maybe the real rival of a kernel is letting agents talk.
Caveats: 1 to 5 runs per mode, and the calibration labels were written by Claude. Repo, with every session, diff and decision published raw: https://github.com/JoaquinRuiz/medula. There's also a walkthrough video, in Spanish with English subtitles: https://youtu.be/xAFRuBxfapM