<?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: Andrew Demczuk</title>
    <description>The latest articles on DEV Community by Andrew Demczuk (@andrew_demczuk_dbf104decc).</description>
    <link>https://dev.to/andrew_demczuk_dbf104decc</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%2F4256324%2Fdf5185a7-97ea-49ee-b336-a6a5111bc6d7.jpg</url>
      <title>DEV Community: Andrew Demczuk</title>
      <link>https://dev.to/andrew_demczuk_dbf104decc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/andrew_demczuk_dbf104decc"/>
    <language>en</language>
    <item>
      <title>Why my agents talk over a signed message bus, not a chat log</title>
      <dc:creator>Andrew Demczuk</dc:creator>
      <pubDate>Fri, 20 Nov 2026 20:20:50 +0000</pubDate>
      <link>https://dev.to/andrew_demczuk_dbf104decc/why-my-agents-talk-over-a-signed-message-bus-not-a-chat-log-h1i</link>
      <guid>https://dev.to/andrew_demczuk_dbf104decc/why-my-agents-talk-over-a-signed-message-bus-not-a-chat-log-h1i</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6z5lvqkzwmg1zcyil52u.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F6z5lvqkzwmg1zcyil52u.gif" alt="Terminal demo of the MeshyChat quick start" width="600" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I keep about 25 persistent agent sessions (Claude Code, Codex, Kimi, Antigravity) running across four machines. Most stay scoped to a repository, a review gate, or a watchdog so they do not cold-start on every task; it is not 25 agents writing code at once.&lt;/p&gt;

&lt;p&gt;For months, coordinating them meant copy-pasting text between terminal windows. That breaks down once work spans machines, operating systems, and vendor subscription plans. After leaving the OpenClaw dev team, I wanted a message layer no single vendor owns, where every ask stays tracked until answered.&lt;/p&gt;

&lt;p&gt;I open-sourced &lt;a href="https://github.com/ademczuk/MeshyChat" rel="noopener noreferrer"&gt;MeshyChat&lt;/a&gt; under the MIT licence. It is a Django and PostgreSQL 16 server, a Python CLI (&lt;code&gt;meshy_node&lt;/code&gt;), and a per-host postbox daemon (&lt;code&gt;tools/postbox/&lt;/code&gt;). It runs no model itself and connects standalone agent CLIs you already run.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not an in-process agent framework
&lt;/h2&gt;

&lt;p&gt;Frameworks like LangGraph or CrewAI build an agent graph out of functions inside one Python runtime. That fits a single program calling APIs in a loop, not an interactive Codex session on one machine talking to Claude Code on another and Kimi on a third, each on its own plan and filesystem.&lt;/p&gt;

&lt;p&gt;MeshyChat gives each session a key pair and mailbox. A session can restart, move hosts, or hit a quota reset without losing threads or open asks.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three pieces
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Signed messages, PostgreSQL RLS, and &lt;code&gt;operator_words&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;Each node generates an Ed25519 key pair locally (&lt;code&gt;meshy_node mint&lt;/code&gt;) and redeems a single-use pairing code. The private key stays in the node's state file; the server holds only the public key.&lt;/p&gt;

&lt;p&gt;Requests and messages use RFC 8785 canonical JSON (&lt;code&gt;rfc8785&lt;/code&gt;) signed with Ed25519 and checked by PyNaCl &lt;code&gt;verify_strict&lt;/code&gt; in &lt;code&gt;apps/crypto/primitives.py&lt;/code&gt;, which rejects small-order public keys and non-canonical scalars. The server signs its read responses too, so clients verify both author and server before showing text.&lt;/p&gt;

&lt;p&gt;PostgreSQL 16 enforces authorization and history through plain SQL migrations (&lt;code&gt;sql/&lt;/code&gt; and &lt;code&gt;sql_meshychat/&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Row-level security.&lt;/strong&gt; &lt;code&gt;apps/core/rls.py&lt;/code&gt; tracks 26 policies over 12 tables. Every request runs &lt;code&gt;SET ROLE meshychat_app&lt;/code&gt; and binds &lt;code&gt;app.current_peer_id&lt;/code&gt; (plus &lt;code&gt;app.server_internal&lt;/code&gt; for internal paths) local to the transaction so pooled connections cannot leak state.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Append-only history.&lt;/strong&gt; Stored messages in &lt;code&gt;shared_memory&lt;/code&gt; have a &lt;code&gt;BEFORE UPDATE&lt;/code&gt; immutability trigger (&lt;code&gt;shared_memory_enforce_immutability&lt;/code&gt; in &lt;code&gt;sql/028_shared_memory_v02.sql&lt;/code&gt;). Edits add a new version and retire the prior head (&lt;code&gt;is_head&lt;/code&gt; from true to false) rather than overwriting rows. Audit tables (&lt;code&gt;invocation_frames&lt;/code&gt;, &lt;code&gt;admin_audit_log&lt;/code&gt;) are also append-only, while namespace grants live in &lt;code&gt;shared_memory_grant&lt;/code&gt; under forced RLS (updatable only to mark revocation).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Authority separation (&lt;code&gt;operator_words&lt;/code&gt;).&lt;/strong&gt; Peer message bodies are always untrusted data. Only pinned operator voice peer IDs can write the &lt;code&gt;operator_words&lt;/code&gt; field (1 to 20 strings on &lt;code&gt;shared/mesh-chat&lt;/code&gt;), and the server refuses it from any other writer (&lt;code&gt;apps/memoryskills/validation.py&lt;/code&gt;). An opt-in &lt;code&gt;directive&lt;/code&gt; field exists under similar roster rules (&lt;code&gt;THREAT-MODEL.md&lt;/code&gt;).&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. Tracked asks (&lt;code&gt;owed&lt;/code&gt; and &lt;code&gt;awaiting&lt;/code&gt;)
&lt;/h3&gt;

&lt;p&gt;In a scrollback chat log, an unanswered question disappears in minutes. Sending with &lt;code&gt;--expects-reply&lt;/code&gt; keeps the message on the recipient's &lt;code&gt;owed&lt;/code&gt; queue and the sender's &lt;code&gt;awaiting&lt;/code&gt; queue until answered with &lt;code&gt;--in-reply-to &amp;lt;key&amp;gt;&lt;/code&gt; and settled with &lt;code&gt;--closes &amp;lt;key&amp;gt;&lt;/code&gt; (replies to &lt;code&gt;question&lt;/code&gt; messages auto-close after a verified read unless &lt;code&gt;--keep-open&lt;/code&gt; is passed).&lt;/p&gt;

&lt;p&gt;A background job (&lt;code&gt;mesh_edges_catch_up&lt;/code&gt;) projects message, reply, close, and &lt;code&gt;owes_ack&lt;/code&gt; edges into &lt;code&gt;mesh_edges&lt;/code&gt;, so nodes query open asks without scanning message bodies.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. The per-host postbox wake
&lt;/h3&gt;

&lt;p&gt;Polling inside an agent prompt burns context and misses mail when idle. On each host, &lt;code&gt;tools/postbox/postbox.py&lt;/code&gt; runs &lt;code&gt;meshy_node listen --monitor&lt;/code&gt; over WebSocket, catches up from the node's cursor after disconnects, fsyncs notices to a local spool, and wakes each CLI according to its runtime (&lt;code&gt;tools/postbox/README.md&lt;/code&gt;):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Claude Code:&lt;/strong&gt; &lt;code&gt;meshy_channel.py&lt;/code&gt; pushes &lt;code&gt;&amp;lt;channel source="meshy"&amp;gt;&lt;/code&gt; events into the session.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Codex:&lt;/strong&gt; the postbox queues notices via &lt;code&gt;codex queue --thread &amp;lt;target&amp;gt; --message &amp;lt;notice&amp;gt;&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Kimi and Antigravity:&lt;/strong&gt; &lt;code&gt;wait_next.py &amp;lt;identity&amp;gt;&lt;/code&gt; runs in the background, exits with the arriving key and &lt;code&gt;reply_with&lt;/code&gt; command, and re-arms after each wake.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Pushes carry routing metadata and the &lt;code&gt;meshy_node read&lt;/code&gt; command rather than body text, so the session fetches and verifies the signed message itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  Patterns that held up
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Overnight watchdog.&lt;/strong&gt; Built on &lt;code&gt;owed&lt;/code&gt;, &lt;code&gt;awaiting&lt;/code&gt;, and &lt;code&gt;mesh_presence&lt;/code&gt;, a periodic check flags sessions that went quiet while owing an answer so stalled work is nudged or reassigned.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cross-vendor PR review gate.&lt;/strong&gt; &lt;code&gt;meshy_node review-receipt&lt;/code&gt; and &lt;code&gt;gate-check&lt;/code&gt; verify a clean review on the exact PR head SHA before merge, such as Codex reviewing Claude Code's commit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Holding deadline or scope changes.&lt;/strong&gt; Agent proposals that slip a date or cut scope stay unapproved until a human signs off via &lt;code&gt;operator_words&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Delivery latency on one node
&lt;/h2&gt;

&lt;p&gt;The README reports one week of telemetry from &lt;code&gt;python -m tools.postbox.latency&lt;/code&gt; across 1,431 messages on a single node (13 to 20 November 2026), not a synthetic load test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sent to landed in local spool:&lt;/strong&gt; 1.2 s median, 2.2 s 95th percentile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Spooled to handed to running session:&lt;/strong&gt; 6 s median, about 19 min 95th percentile.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Handed over to agent reading it:&lt;/strong&gt; 17.5 s median, 2.7 min 95th percentile.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;1,412 of 1,431 messages were handed on and 1,322 were read, with zero skipped wakes. The 19-minute 95th percentile in the middle stage is the coding session finishing its active turn before taking new mail, not server delay.&lt;/p&gt;

&lt;h2&gt;
  
  
  What broke in practice
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Stale presence.&lt;/strong&gt; A crashed session used to appear active until TTL expiry; &lt;code&gt;apps/dashboard/queries.py&lt;/code&gt; now flags unrefreshed or expired states as &lt;code&gt;presence_stale&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Silent listener deaths.&lt;/strong&gt; On 1 October 2026, two listeners died while the 5-minute inbox reconciler kept advancing &lt;code&gt;last_poll_ok_at&lt;/code&gt; for five hours. That led to &lt;code&gt;postbox.py --liveness&lt;/code&gt; (checking live PIDs) and &lt;code&gt;tools/postbox/unsurfaced.py&lt;/code&gt; to track notices delayed between dispatch and read.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Quota resets.&lt;/strong&gt; Hitting plan limits mid-task is routine; having another vendor's session on the same bus lets work move instead of waiting.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Early status and known gaps
&lt;/h2&gt;

&lt;p&gt;From &lt;code&gt;RELEASE-NOTES.md&lt;/code&gt;, this first public cut has explicit gaps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The README's 3D graph GIF shows an internal operator UI that is not in this release (this cut is server, CLI, and postbox).&lt;/li&gt;
&lt;li&gt;Docs under &lt;code&gt;docs/&lt;/code&gt; still carry placeholders (&lt;code&gt;sampleco&lt;/code&gt;, &lt;code&gt;example.com&lt;/code&gt;, &lt;code&gt;C:/Users/user&lt;/code&gt;), two CLI defaults still name &lt;code&gt;sampleco&lt;/code&gt;, and extra &lt;code&gt;MESHYCHAT_*&lt;/code&gt; variables live only in &lt;code&gt;meshychat/settings.py&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The hosted task-board adapter (&lt;code&gt;tools/meshy_node/board_{tasks,queue,claim,dispatch}.py&lt;/code&gt;) is stubbed; &lt;code&gt;apps/board&lt;/code&gt; is included.&lt;/li&gt;
&lt;li&gt;This tree is not wire-compatible with the original deployment because tables, headers, and signing domains were renamed.&lt;/li&gt;
&lt;li&gt;The full suite has about 12,200 tests (PostgreSQL 16 required). A three-shard run before the public commit had 13 failures of 12,168: 4 migration rename tests in &lt;code&gt;tests/test_p2_meshychat_names.py&lt;/code&gt; (now deselected in &lt;code&gt;tests/public_cut_deselect.txt&lt;/code&gt;, leaving three grant and RLS checks unverified here), 3 needing a &lt;code&gt;meshychat_owner&lt;/code&gt; DB role absent on that fresh DB, 1 expecting a committed tree, and 5 timing-sensitive under parallel load (4 passed alone).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Under MIT, you can lift &lt;code&gt;apps/crypto/primitives.py&lt;/code&gt;, the &lt;code&gt;owed&lt;/code&gt;/&lt;code&gt;awaiting&lt;/code&gt; SQL model, &lt;code&gt;operator_words&lt;/code&gt;, or &lt;code&gt;tools/postbox/&lt;/code&gt; on their own.&lt;/p&gt;

&lt;p&gt;Repository: &lt;a href="https://github.com/ademczuk/MeshyChat" rel="noopener noreferrer"&gt;https://github.com/ademczuk/MeshyChat&lt;/a&gt;&lt;/p&gt;

</description>
      <category>aiagents</category>
      <category>postgres</category>
      <category>django</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
