<?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: fujibee</title>
    <description>The latest articles on DEV Community by fujibee (@fujibee).</description>
    <link>https://dev.to/fujibee</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3955254%2F65578a72-abd1-42c0-b15d-47413c1be981.png</url>
      <title>DEV Community: fujibee</title>
      <link>https://dev.to/fujibee</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/fujibee"/>
    <language>en</language>
    <item>
      <title>I built agmsg so Claude Code and Codex could stop using me as a copy-paste relay</title>
      <dc:creator>fujibee</dc:creator>
      <pubDate>Thu, 28 May 2026 00:00:10 +0000</pubDate>
      <link>https://dev.to/fujibee/i-built-agmsg-so-claude-code-and-codex-could-stop-using-me-as-a-copy-paste-relay-m42</link>
      <guid>https://dev.to/fujibee/i-built-agmsg-so-claude-code-and-codex-could-stop-using-me-as-a-copy-paste-relay-m42</guid>
      <description>&lt;p&gt;My main driver is Claude Code, with Codex bolted on for the hard parts and reviews. The split works surprisingly well. But after a while I noticed something dumb: I had become a human copy-paste relay between two AIs.&lt;/p&gt;

&lt;p&gt;Copy what Claude Code wrote, paste it into Codex for review, copy Codex's feedback, paste it back into Claude Code. Dozens of times a day. It's tedious, it breaks focus, and I'd occasionally paste the wrong thing. I had two capable agents sitting side by side and was personally doing the dumbest job in the loop — carrying messages between them.&lt;/p&gt;

&lt;p&gt;Agents should just be able to message each other directly. So I built &lt;code&gt;agmsg&lt;/code&gt; and put it on GitHub: &lt;a href="https://github.com/fujibee/agmsg" rel="noopener noreferrer"&gt;https://github.com/fujibee/agmsg&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it first (30 seconds)
&lt;/h2&gt;

&lt;p&gt;You're an engineer; you'd rather run it than read about it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;bash &amp;lt;&lt;span class="o"&gt;(&lt;/span&gt;curl &lt;span class="nt"&gt;-fsSL&lt;/span&gt; https://raw.githubusercontent.com/fujibee/agmsg/main/setup.sh&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then restart Claude Code / Codex and run &lt;code&gt;/agmsg&lt;/code&gt; (&lt;code&gt;$agmsg&lt;/code&gt; on Codex). It asks for a team name and an agent name on first use. The README has the full quickstart and copy-paste commands.&lt;/p&gt;

&lt;p&gt;Once two agents join the same "team," they can message each other. After that you just talk to your agent: "tell alice the review is done," "any messages?" — that's it.&lt;/p&gt;

&lt;p&gt;The only dependencies are &lt;strong&gt;bash and sqlite3&lt;/strong&gt;. No daemon, no network, no Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why run two coding agents at all
&lt;/h2&gt;

&lt;p&gt;This started by accident. Claude Code (Opus 4.6) got stuck on a gnarly implementation — kept going in circles no matter how I rephrased it. On a whim I handed the exact same spec to Codex (GPT-5.3), and it produced a correct version almost instantly. That was a quiet shock.&lt;/p&gt;

&lt;p&gt;Since then I've split the roles:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code&lt;/strong&gt; — the daily driver. Fast, high volume, follows direction well.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Codex&lt;/strong&gt; — reviewer and last resort for hard problems. A bit clumsy for everyday driving, but the one I trust on correctness for tricky code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither is "better" — they have different temperaments, so they're good at different moments. And the instant I started running both, the carrier-pigeon problem began.&lt;/p&gt;

&lt;h2&gt;
  
  
  What agmsg is
&lt;/h2&gt;

&lt;p&gt;In one line: &lt;strong&gt;CLI AI agents message each other through a shared SQLite database.&lt;/strong&gt; Claude Code, Codex, Gemini CLI — any CLI agent works.&lt;/p&gt;

&lt;p&gt;It's built as an &lt;a href="https://agentskills.io/" rel="noopener noreferrer"&gt;Agent Skill&lt;/a&gt;, so you install it as a skill and don't touch the agent itself. It turned out better than I expected, so I open-sourced it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design decisions
&lt;/h2&gt;

&lt;p&gt;The order I went through, and why.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I checked the built-ins first.&lt;/strong&gt; I didn't want to reinvent anything, so I looked at Claude Code's team / subagent features. They're designed around short-lived sessions — great for spinning off a one-off subtask, but not for two agents holding an ongoing conversation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I started with plain text files.&lt;/strong&gt; The built-in team agent was file-based and simple, so I did the same. Fine for short-lived use — but the moment you want persistent + concurrent, it falls apart: write conflicts, corrupted files.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So I moved to SQLite (WAL mode).&lt;/strong&gt; Multiple readers + one writer, no conflicts; transactions that survive concurrent access; message history for free.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But keep dependencies minimal.&lt;/strong&gt; This is the part I cared about most. You could make it as rich as you want, but I wanted it to run the instant you drop it in, on anyone's machine. The result: it runs anywhere &lt;strong&gt;bash and sqlite3&lt;/strong&gt; run. No daemon of its own (agmsg has no resident process; only &lt;code&gt;monitor&lt;/code&gt; mode piggybacks on Claude Code's built-in Monitor), no network (all local), no Python.&lt;/p&gt;

&lt;h2&gt;
  
  
  Delivery modes — monitor is what made it usable
&lt;/h2&gt;

&lt;p&gt;There are roughly three ways a message reaches an agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;manual&lt;/strong&gt; — you run &lt;code&gt;/agmsg&lt;/code&gt;, or ask the agent to "check the inbox." Reliable, but you have to remember.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;hook&lt;/strong&gt; — checks between turns (on the Stop hook). Codex defaults to this, since it has no Monitor tool.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;monitor&lt;/strong&gt; — subscribes to SQLite continuously and interrupts the conversation in real time when a message lands. This is the default on Claude Code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Honestly, &lt;strong&gt;monitor is what tipped it from toy to useful.&lt;/strong&gt; With manual/hook there's a gap — the other side already replied, but you don't notice until you poke it. With monitor, the conversation just flows.&lt;/p&gt;

&lt;p&gt;The mechanism (riding Claude Code's Monitor on top of a blocking SQLite read) is interesting enough that I want to write it up separately.&lt;/p&gt;

&lt;p&gt;And here's the fun part. Put two monitor-mode Claude Code instances on the same team and leave them alone, and they keep talking with zero human input. I told two of them to "play tic-tac-toe," and they sent moves back and forth and played the whole game out. Not useful, exactly — but watching two agents volley autonomously is genuinely fun:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fytadsd2tqrp57nkw4l0p.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fytadsd2tqrp57nkw4l0p.gif" alt=" " width="600" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Two monitor-mode Claude Code instances playing tic-tac-toe over agmsg, no human in the loop (real game, static gaps trimmed, ~2.5x).&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What's next
&lt;/h2&gt;

&lt;p&gt;The thing I fought hardest while building this was that Claude Code and Codex have completely different hook and config models. Claude Code has Monitor and rich SessionStart hooks; Codex has neither. Splitting delivery into monitor / turn is there to absorb that gap, and the config files live in different places and formats for each. Getting the same "notice when a message arrives" to work across two agents with different foundations took the most thought.&lt;/p&gt;

&lt;p&gt;How to smooth over those heterogeneous-agent seams — and the monitor internals I mentioned — are what I'll write about next.&lt;/p&gt;

&lt;p&gt;For now: install it and let Claude Code and Codex talk to each other directly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/fujibee/agmsg" rel="noopener noreferrer"&gt;https://github.com/fujibee/agmsg&lt;/a&gt;&lt;/p&gt;

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