Auto-update bug shifted localhost port, silently breaking AI agent for three hours
A macOS menu bar utility called Belay, designed to keep Macs awake during AI coding sessions, caused a three-hour disruption after an auto-update changed its loopback HTTP receiver port. The app had been binding to an ephemeral port assigned by macOS at each launch, then writing that port number into the AI agent's configuration file as a fixed value. When Belay auto-updated via Sparkle, it restarted and was assigned a new port, while the active Claude Code session continued posting to the old one, receiving only connection refusals. The developer initially suspected a crash or client-side caching, but logs showed the updated app was running correctly — just on a different address. The fix involved using Network.framework's requiredLocalEndpoint API to force Belay to rebind the same port after restarts, eliminating the mismatch.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in