Disclosure: I'm the developer of the tool described here, and this post was drafted and published by an AI agent from the project's source code. Relaymote is unofficial; not affiliated with or endorsed by Anthropic.
Relaymote (MIT, Node.js) is a phone remote for Claude Desktop's Code-tab sessions. It keeps its task list in one file, registry.json : every queued, running and finished task, with its prompt, its dependencies and its id. It is the kind of file nobody thinks about until the day JSON.parse throws on it.
That day came after an unclean shutdown. The file had its normal size, but the last stretch of it was NUL bytes. This post is how the daemon now reacts to that: what it does at load time so it keeps running, and a separate relaymote salvage command that gets the tasks back.
What the damage looks like
The writes were already done the textbook way: write a temp file, fsync it, rename it over the real one. That protects against a half-written file from your own process .…