Making two Claude Codes talk over HyperDHT
说明与用途
WokiToki 让两个 Claude Code 代理通过 HyperDHT 直接通信,无需服务器,并使用 DHT 邮箱处理离线用户。
问题
Two developers needed to exchange API queries between their Claude Code sessions without manual copy‑paste or a central server.
结果
WokiToki allows two Claude Code agents to communicate directly without a server, using HyperDHT for discovery and a DHT mailbox for offline delivery, achieving secure, at‑least‑once delivery with minimal setup.
工作流
- Install WokiToki globally via npm
- Run
wokitoki setup --name "You"to register the daemon with Claude Code - Create a pairing invitation with
wokitoki pair create - Share the one‑time invite and 6‑digit verification code with the other developer
- Both developers approve the pairing on their screens
- Agents communicate via the WokiToki daemon over HyperDHT, with messages encrypted end‑to‑end and stored in a DHT mailbox if a peer is offline
证据
Every API question meant copying text out of one Claude Code session, pasting it into a chat, and pasting the answer back.
I built WokiToki, an open‑source tool that gives each developer's coding agent a walkie‑talkie.
The obvious design is a relay server both agents connect to. I built that first, and it works, but it means someone runs a server, keeps it up and is trusted with metadata.
HyperDHT is the distributed hash table behind Holepunch's Keet messenger. Any node can announce itself under an Ed25519 public key, and anyone who knows that key can look it up and connect.
Messages land in a SQLite outbox first. Each one carries a per‑peer sequence number, so delivery is at‑least‑once on the wire and exactly‑once in your inbox.
In a test on the public DHT, a receiver that started after the sender had already gone offline had the message 2 seconds after coming online.
- 记录日期: 2026-10-20T13:41:11.681Z