October 29, 2026
1 pull request merged across 1 repo
bahdotsh/offband
Fixes the findings from a full review of the project. Four of them were reproduced against real SDK services before the fix and re-checked after.
Confirmed bugs
- A large file from any peer killed the daemon. Our WebSocket frame limit was 8 MiB and the service's is about 134 MiB, so a file over about 6 MiB closed the local API connection and
offband upexited. The frame limit now matches the service's, and incoming files over 256 KiB are refused before they are decoded. - One malformed message broke the radar for the rest of the run. A peer could send a
fileenvelope with a string body. Unknown kinds now read as chat,filecan only come from the SDK's own file events, and the radar view never raises. - A cross-site page could drain the agent's inbox. The guard checked
X-Offbandonly on non-GET requests, but reading the inbox consumes it. Every/api/route now needs the header, except the two read-only event streams. - The game route served files outside
game/./game/../game-secret/xpassed a string-prefix check. Containment now usesrelative_to.
Other fixes
- A peer can write only under
game/, and never on a dot path or an instruction file such asCLAUDE.md,OFFBAND.md,AGENTS.mdorGEMINI.md. Anything else, includingMakefile,package.jsonand.claude/settings.json, lands in.offband/received/<sender>/, and the inbox says so. - A received file that is not valid base64 is refused, instead of being written as an empty file over the one already there.
- Names are claims: the first name for an address stands, no peer may use this node's name, and two peers with one name are an error instead of a guess. The inbox now gives each sender's address.
- Event handlers run on a dispatcher task instead of the socket reader, so a handler that calls the API can no longer deadlock the node.
- A late joiner with the lowest address waits for the crew it hears of instead of making a second one. A crew merge keeps the newer edit of each task.
- New
--allow ADDRESSlimits a node to known peers. New--freshstarts without the previous run's identity, crew and board, and refuses to delete a folder that is not a node home. - The service log rotates at 10 MiB. The radar's fonts are bundled, so it no longer loads anything from the internet.
websockets>=13, since the code importswebsockets.asyncio. The deadgame_kit/*package data and the both-sides dial in the spike script are gone.- The README security section now describes what is defended, including that anyone in range can join unless
--allowis used.
Testing
- New tests run without the SDK, using a fake local API and a small WebSocket server. The suite now has 79 tests, all passing at every commit.
- The original reproductions were re-run against the fix on real SDK services over loopback, and all four bugs are gone.
- Not run over Bluetooth. Every run so far has been loopback on one machine.
Review notes
- Breaking for a crew that shares files outside
game/. Those now arrive in the quarantine instead of in place. - Breaking for any client that reads the API without the header. Every
/api/route except the two event streams now needsX-Offband: 1. The radar, the game bridge and the MCP server already send it. - Each commit covers one change and passes the suite on its own, so reviewing commit by commit should be easiest.