Changing macOS timezone invalidates the running daemon (supervisor_generation_stale) #1472
Closed
bierlingm
started this conversation in
Bug reports
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
This is a re-file of #879 under the discussion-first process. The original Issue was closed in the backlog sweep, not as a rejection of the bug. I hit the same failure today on 0.7.2 after a timezone change.
What happens
If the macOS timezone changes while the Prime Agent daemon is still running, the next
prime-agentlaunch times out:The daemon log shows:
prime-agent statusstill reports the old daemon ascurrentwith 0 sessions, soprime-agent doctor --fixdoes not clean it up.Environment
/etc/localtimeupdated at 12:35 local)Reproduction
prime-agentso the background daemon is running.prime-agentagain.Expected
The running daemon stays valid, or the client notices the identity mismatch and replaces it.
doctor --fixshould also treat this as a broken service.Actual
New workers reject the supervisor as
supervisor_generation_stale.createwaits 30s and then the CLI crashes.Root cause:
getProcessStartId()usesps -o lstart=, which is rendered in the current local timezone. After the change, the same pid gets a different start id. In this case:ps:Sat Aug 15 00:10:51 2026ps:Sat Aug 15 04:10:51 2026Worker auth then fails the ownership check.
Workaround
A new supervisor records the current
lstartandcreatesucceeds immediately. A timezone-stable start id (or auto-recycle on mismatch) would avoid this.All reactions