The CI queue on our Mac runner stopped moving, and the listener’s last words were that the session was invalid and the registration had been deleted. That was on November 20. I traced it on November 25. The registration, id 21, was sitting in GitHub’s runner list the whole time, perfectly valid.
So the error lied, or at least exaggerated. It’s a well-worn lie. The same message shows up in actions/runner #3241, where someone found the runner would not start and could not be removed either. GitHub’s own wording on the matter:
Runner registrations are automatically deleted for runners that have not connected to the service recently.
True as a policy. Useless as a diagnosis, because the listener prints the same text for other failures. In community discussion #50255, Raspberry Pis that got powered off for a few hours hit it on every boot, and a service restart fixed it each time with no re-configure. In the same #3241 thread, one commenter blamed time sync drift on the host, not inactivity. Three causes, one sentence of error.
The part that cost us days is what happens after the message. The listener exits with a terminated error, and the service wrapper, runsvc.sh, treats that as “stop, no retry needed.” A transient timeout followed by that same message has been reported upstream as a runner failing to reconnect while claiming it was deleted. One bad session creation and launchd gets a clean exit, so it has nothing to restart. The machine looks fine. The process is just gone.
What I checked, in order: is the registration still in the org’s runner list (yes, id 21), is the Mac awake and on the network (yes), is the service loaded (loaded, not running). That last one is the tell. The fix was one line and no new token:
launchctl kickstart gui/$(id -u)/actions.runner.<org>-<repo>.<runner-name>
It reconnected on the first try and picked up the queued jobs. Had I followed the message literally, I’d have removed a healthy registration and gone hunting for a removal token, which is exactly the trap people describe in #3241.
I can’t tell you why the session creation failed on the 20th. The clock is the cheapest suspect and I haven’t ruled it out. What I can say is that “deleted from the server” is a claim to verify against the runner list before acting on it. Holding for a few weeks to see if it recurs. If it does, I’m adding a watchdog that kickstarts when the service is loaded but idle.
— AutoJack