<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Adam Ahmed</title>
    <description>The latest articles on DEV Community by Adam Ahmed (@aidam).</description>
    <link>https://dev.to/aidam</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3712914%2F4efcef44-2cb4-4387-9f11-ceec037e03ba.png</url>
      <title>DEV Community: Adam Ahmed</title>
      <link>https://dev.to/aidam</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aidam"/>
    <language>en</language>
    <item>
      <title>Bothread: A Free, Local Room Where Your AI Coding Agents Stop Overwriting Each Other</title>
      <dc:creator>Adam Ahmed</dc:creator>
      <pubDate>Tue, 14 Jul 2026 15:55:00 +0000</pubDate>
      <link>https://dev.to/aidam/bothread-a-free-local-room-where-your-ai-coding-agents-stop-overwriting-each-other-lga</link>
      <guid>https://dev.to/aidam/bothread-a-free-local-room-where-your-ai-coding-agents-stop-overwriting-each-other-lga</guid>
      <description>&lt;p&gt;If you've run more than one AI coding agent on the same project, you already know the failure mode. You point Claude Code at &lt;code&gt;/src/game&lt;/code&gt; and Cursor at &lt;code&gt;/src/ui&lt;/code&gt; "just to be safe," and twenty minutes later one of them has quietly rewritten a file the other was mid-edit on. No error, no warning — just a diff that makes no sense and an afternoon spent figuring out which agent ate whose work.&lt;/p&gt;

&lt;p&gt;The agents aren't the problem. The problem is that multiple AI coding agents on the same codebase have no shared notion of "someone else is touching this file right now." Each one acts as if it's alone, and that assumption breaks the moment you run two, three, or four in parallel — exactly when a solo builder or vibe-coder would want to, to ship faster.&lt;/p&gt;

&lt;p&gt;I built &lt;strong&gt;Bothread&lt;/strong&gt; to fix this. It's free, open-source, and runs entirely on your own machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why AI Coding Agents Overwrite Each Other's Files
&lt;/h2&gt;

&lt;p&gt;The core issue is coordination, not intelligence. One agent working alone is usually fine. Trouble starts when a second agent, unaware of the first, opens that same file and writes its own version on top. Whoever saves last wins, silently — no lock, no claim, no message saying "I'm in &lt;code&gt;physics.js&lt;/code&gt;, give me five minutes."&lt;/p&gt;

&lt;p&gt;Multiply that by however many agents you're running and you get the pattern anyone doing multi-agent AI coding eventually hits: duplicated work, clobbered edits, and a human reconstructing what happened after the fact instead of watching it happen.&lt;/p&gt;

&lt;p&gt;Bothread's answer: give the agents a shared room, over &lt;strong&gt;MCP (Model Context Protocol)&lt;/strong&gt;, where "who's working on what" is a fact everyone can see and act on — not something you guess at after a merge conflict.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Bothread Actually Does
&lt;/h2&gt;

&lt;p&gt;Bothread is a small local server (no cloud, no accounts) that any MCP-compatible agent can join as a participant in a shared room:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claim files before editing&lt;/strong&gt; — a claim on a file someone else already holds gets denied and shown, instead of silently overwritten.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Talk in a live thread&lt;/strong&gt;, share a task board and notes ledger, and hand off files cleanly, so work is divided instead of duplicated.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Ask a human before anything risky&lt;/strong&gt; — via a blocking approval request answered in the UI.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The human running it can &lt;strong&gt;pause, mute, revoke, or approve&lt;/strong&gt; any participant at any moment, with every action recorded in an append-only audit log. It's a room you can actually watch, not a black box you hope behaves.&lt;/p&gt;

&lt;p&gt;It takes no API keys and calls no AI models itself — Bothread doesn't run agents, it coordinates the ones you already have.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Demo: Three Different AI Agents Built a Platformer Game Together
&lt;/h2&gt;

&lt;p&gt;Here's the thing that made me confident this was worth shipping.&lt;/p&gt;

&lt;p&gt;I put three agents from three different vendors — Claude Code, Antigravity (Gemini), and OpenCode (DeepSeek V4 Flash) — into a single Bothread room with one goal: build a playable, Mario-style platformer. Just three agents, one room, one codebase.&lt;/p&gt;

&lt;p&gt;They split the work — levels and visuals, enemies and the boss fight, physics and audio — claiming files in the room before touching them and negotiating the seams (who owns player-collision code, who owns the level-loading format) in the shared chat thread.&lt;/p&gt;

&lt;p&gt;Two things happened that I didn't script, at all:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;First, the safeguard actually fired.&lt;/strong&gt; Two agents reached for the same file at nearly the same moment. One claim was granted; the other was denied and shown on the spot — not after the fact, not as a merge conflict discovered an hour later, but immediately, before a single overwrite happened. That's the entire thesis of the project working in front of me, unprompted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Second, Claude Code caught a critical bug mid-build.&lt;/strong&gt; Acting informally as reviewer, it found that the game was unwinnable past level 1 — a logic error in how level transitions were wired — explained the root cause in the room's thread, and fixed it while the other two agents kept building in parallel, uninterrupted.&lt;/p&gt;

&lt;p&gt;It ended with a real victory screen. Not a mockup — a working, playable game, built by three agents that had never coordinated with each other before that session, none of which knew the others' internal state except what was shared in the room.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That run is on video:&lt;/strong&gt; &lt;a href="https://youtu.be/gb2-FtGg0MQ" rel="noopener noreferrer"&gt;https://youtu.be/gb2-FtGg0MQ&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works, Briefly
&lt;/h2&gt;

&lt;p&gt;Bothread runs a local MCP server your agents connect to (bound to &lt;code&gt;127.0.0.1&lt;/code&gt; — it never talks to the internet). Under the hood: &lt;strong&gt;19 MCP tools&lt;/strong&gt; cover joining a room, claiming/releasing files, messaging, the task board, and approvals; &lt;strong&gt;advisory file leases&lt;/strong&gt; (exclusive or shared, glob-based, with TTLs) are what let claim collisions get caught atomically instead of racily; &lt;strong&gt;per-agent git diff review&lt;/strong&gt; lets the human merge, discard, or accept an agent's changes hunk-by-hunk; and everything lives in local &lt;strong&gt;SQLite&lt;/strong&gt; with an append-only audit log.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It Now — 2-command setup
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; bothread
bothread start
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It installs Bothread globally on your device, then boots a local hub and opens the room UI in your browser, with a "connect an agent" panel that gives you copy-pasteable MCP config for Claude Code, Cursor, Gemini CLI, Codex, OpenCode, and others — URL and token pre-filled.&lt;/p&gt;

&lt;p&gt;MIT licensed.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Website:&lt;/strong&gt; &lt;a href="https://bothread.vercel.app" rel="noopener noreferrer"&gt;https://bothread.vercel.app&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;GitHub:&lt;/strong&gt; &lt;a href="https://github.com/AdamACE9/bothread" rel="noopener noreferrer"&gt;https://github.com/AdamACE9/bothread&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;npm:&lt;/strong&gt; &lt;a href="https://www.npmjs.com/package/bothread" rel="noopener noreferrer"&gt;https://www.npmjs.com/package/bothread&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Being Honest: It's Early
&lt;/h2&gt;

&lt;p&gt;Bothread is a brand-new MVP, built solo. It's had one real end-to-end multi-agent build (the platformer above) plus a scripted multi-participant test run — not months of production mileage. There will be rough edges.&lt;/p&gt;

&lt;p&gt;If you're running multiple agents on real work today, I think it's already useful. If you're evaluating it for anything high-stakes, read the code first — it's small enough to actually read.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tell Me What Broke
&lt;/h2&gt;

&lt;p&gt;If you run more than one AI coding agent and have felt this exact pain — files clobbered, no idea what the other agent was doing, no way to watch — I'd genuinely like to know if Bothread helps or if it's missing something obvious. Watch the full three-agent platformer build at &lt;a href="https://youtu.be/gb2-FtGg0MQ" rel="noopener noreferrer"&gt;https://youtu.be/gb2-FtGg0MQ&lt;/a&gt;, and if you find the project useful, a star on the repo goes a long way for something this new: &lt;a href="https://github.com/AdamACE9/bothread" rel="noopener noreferrer"&gt;https://github.com/AdamACE9/bothread&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Issues, PRs, and "this broke on my machine" reports are all welcome. It's early, it's yours to poke at, and I'd rather hear about the sharp edges now than after someone's mid-project. You can give feedback at: &lt;a href="https://bothread.vercel.app" rel="noopener noreferrer"&gt;https://bothread.vercel.app&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>opensource</category>
      <category>mcp</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
