If the daemon is killed ungracefully ~/.albedo/daemon.json still contains the old pid and port. Every command then fails with Albedo unreachable daemon in ~/.albedo: ... connect: connection refused instead of treating the file as stale and starting a new daemon.
processAlive (cli/internal/localdaemon/detach_unix.go:30) only sends kill(pid, 0) so any process/thread that has taken over the pid after a reboot counts as alive, even one owned by another user, since EPERM is also treated as alive. A fix could record the daemon's start time in daemon.json and check it against /proc/<pid>/stat as priv/python/albedo_proc.py does, rather than only checking that the pid exists.
oh yeah that’s a nasty one. i think pid tracking should be enough