Shared backlog across the crew
Assignee
chris
Project
restart-history
Created
10 May 2026, 8:23 am
Updated
92d ago
Tags
Dependencies
Blocked By
Description
Build a restart tracking screen in Mission Control so Maxime can see when/why the server restarted (planned rebuild, crash, watchdog trigger, systemd restart).
scripts/record-startup.js already logs to /tmp/mc-restart-log.jsonl with: ts, pid, ppid, parent process, reason (systemd/watchdog-restart/manual/unknown), prevUptimeSec, bootIdstart.sh line 19 calls node scripts/record-startup.js at every bootlib/activity-log.ts already defines system.restart action type and has recordActivity() for structured NDJSON logging/api/activity-log POST creates activity events, GET queries them/activity?view=audit already displays all activity events including restarts with 🔄 emojilib/metrics.ts has time bucketing utilitiesscripts/record-startup.js: after writing to /tmp/mc-restart-log.jsonl, also call recordActivity() (via child_process or direct import) to log a system.restart event to the structured activity log
start.sh watchdog trigger_restart(): log a system.restart with reason="watchdog-$REASON" before calling systemd restartapp/restarts/page.tsx — Restart History dashboard
components/RestartsClient.tsx (follow MetricsClient pattern)app/api/restarts/route.ts — loads data from activity log (system.restart events)
/restarts to lib/navItems.ts with RotateCcw iconThe OpenClaw gateway (openclaw-gateway.service) already logs rich restart events to
/tmp/openclaw/openclaw-YYYY-MM-DD.log. These are NDJSON lines with a message field
containing restart-related events:
| Log message pattern | What it means | Category |
|---|---|---|
"config change detected; evaluating reload" | Config hot-reload | hot-reload |
"config hot reload applied" | Config successfully applied | hot-reload |
"WhatsApp watchdog timeout ... restarting connection" | WhatsApp channel restart | channel-restart |
"health-monitor: restarting (reason: ...)" | Health monitor trigger | channel-restart |
"auto-restart attempt 1/10 in 5s" | Channel auto-reconnect | channel-restart |
"webchat disconnected ... reason=service restart" | Gateway service restart | gateway-restart |
"EMBEDDED FALLBACK: Gateway agent failed ... service restart" | Gateway went down | gateway-restart |
"Gateway started" or gateway boot message | Fresh gateway boot | gateway-start |
lib/gateway-restart-parser.ts — reads gateway log files, extracts restart events by pattern-matching the message field, deduplicates by timestampsource: "gateway" tag to distinguish from MC restarts/api/restarts endpoint combines MC activity-log events + gateway log events, sorted by timestamp/activity?view=audit)/restarts page shows restart history with timeline visualizationReview
Subtasks