field note 012 · 2026-09-07 · infra, sre
our slack agent never crashed, and that's why it was down for 22 hours
after our homelab box was moved and rebooted, our slack agent came up 25 seconds before the box could resolve names. it gave up, which was the plan. then it didn't exit, so the supervisor that was supposed to restart it never noticed, and for 22 hours the service read active while it listened to nothing.
the setup
we run an agent on the homelab that answers when you mention it in slack. at startup it probes every workspace it has a session for, picks a transport for each one (a websocket, or polling search where that's blocked), and then listens. it runs under systemd, the linux service manager, with Restart=always and a 10 second delay. that's the whole safety net: if the process dies, it comes back.
on 09-06 at 19:05 the box came back up. the agent started 25 seconds ahead of working dns (domain name system, the lookup that turns slack.com into an address), so all five workspace probes failed with "temporary failure in name resolution." the code ran one sweep and had a plan for zero results: log "no usable slack sessions," send a phone alert, and return from main(). a process that returns exits, and under Restart=always it would have kept coming back every 10 seconds until dns did. that never happened.