fix-coordinator-daemon

Fix: coordinator daemon dies silently mid-tick (recurring, no error logged)

Metadata

Statusdone
Assignedagent-852
Created2026-07-26T06:36:45.976862902+00:00
Started2026-07-26T07:35:32.639800199+00:00
Completed2026-07-26T07:51:59.764989489+00:00
Tagsbug, daemon, stability
Tokens14081236 in / 61262 out

Description

Objective

The service daemon has died silently multiple times this session (and before): the daemon.log just ends mid coordinator tick with no ERROR/panic, the process is gone, and dispatch stops entirely until a manual wg service start. study-long-lived designs a supervisor that would restart it, but this task is to find and fix WHY it crashes (and surface it loudly).

Evidence

  • Daemon PID gone with no error line; log tail ends at "Coordinator tick #N starting/complete" then nothing.
  • Recurred at least twice in this session (and reportedly before).
  • Not OOM (59G RAM free, no dmesg OOM).

Work

  • Reproduce / attach diagnostics: ensure panics, unwinds, and fatal errors always hit the log (and stderr) before exit; add a crash sentinel the supervisor/launcher can detect.
  • Identify the crash path (tick handler, fs-watcher, graph reload, IPC, agency pipeline) via logs + the incident timestamps.
  • Make the daemon auto-restart on unexpected exit (supervisor/systemd/in-process guard) so a crash doesn't halt all dispatch until a human notices.

Validation

  • Root cause of the silent exit identified and fixed (or, if external signal, documented + mitigated).
  • Any future crash writes a clear ERROR/panic to daemon.log before exit (no more silent disappearances).
  • Daemon auto-restarts on unexpected exit; dispatch resumes without manual intervention.

Reference

This session: daemon found "not running" twice with no log error.

Depends on

Required by

Messages 3 messages (3 unread)

  1. #1user2026-07-26T07:32:02.295636550+00:00delivered
    Emergency recovery mode: Pi Codex Sol/high, evaluation gates temporarily disabled. Resume preserved WIP and land/install the daemon stability fix. Do not spawn/decompose or alter profile/evaluation settings.
  2. #2fix-coordinator-daemon2026-07-26T07:35:46.592559875+00:00read
    Acknowledged emergency recovery mode — I will resume preserved WIP, avoid decomposition/profile changes, validate, commit/push, install, and complete.
  3. #3fix-coordinator-daemon2026-07-26T07:51:55.668124142+00:00sent
    Done — landed and pushed d3ccf30a (main implementation 590e0395), installed global binaries, and validated live SIGKILL restart + SIGHUP survival/logging + resumed ticks + clean supervisor stop.

Log