Repository navigation
Description
What: agent-observer health reports how far the ledger is behind the machine's native session records and fails when it is behind.
Why: rocky and cavallo kept running agent sessions after 3 Nov while their sync failed every hour, and nothing in Observer could tell: health only looks for running sessions with no transcript, never for recorded sessions missing from the ledger.
So what: A worker adds the freshness check to health in this repository; the broken sync jobs themselves are runbook#38.
Outcome
Any person or agent who runs health on a machine learns whether that machine's ledger covers its recent agent work, and the answer is a failure when it does not.
Evidence
- rocky and cavallo: sync log shows
exit=2every hour since 2026-11-03 (can't open file .../.local/bin/agent-observer); see lukemaj/runbook#38. - Native session files modified since 2026-11-03 (
find -newermt): rocky Claude 160, Codex 61, Grok 810; cavallo Claude 90, Codex 124, Grok 1143. None of this work is in their ledgers. agent_observer/health.pychecks only running sessions without a transcript ("running session has no transcript: it is invisible to Observer"). On bestiahealthprinted "checked 133 Claude sessions and 0 agent processes: 0 invisible", which says nothing about ledger freshness.- The 25 Nov Agent Observer review could cover bestia only, and did not notice until the user pointed out that rocky and cavallo had sessions.
Acceptance criteria
-
healthreports, per harness, the time of the newest native record and of the newest ledger import, and the count of native session sources newer than the ledger. -
healthexits nonzero and names the gap when native records are newer than the ledger by more than one sync interval (configurable), including when the ledger was never synced. -
health --jsoncarries the same fields so a scheduled job or the weekly review can read them without transcripts. - Existing invisible-session findings keep working.
Required proof
Tests with fixture native records newer than the ledger (stale, never synced, current). A run on a copy of a stale ledger reports the gap.
Non-goals
No sync scheduling, alert delivery or install changes (runbook#38); no cross-machine transport; no change to attribution (#105).
Blockers
None.
Elon record
Requirements and who asked: The user, 25 Nov: Observer not knowing its ledger is behind real sessions is the bigger problem.
Deleted: A new daemon, a cross-machine aggregator and a separate monitor; health already exists and is the place people and agents check.
Bottleneck: health has no freshness check, so a dead sync looks healthy.
Checked myself: Read both machines' sync logs and counted their native session files over ssh; read agent_observer/health.py; ran health on bestia.
Activity
lukemaj commentedon Nov 25, 2026
What PR #150 adds per-harness ledger freshness to
agent-observer health.Why The live-session checks returned success while native records were newer than the ledger.
So what CI and independent review passed. PR #150 is ready for merge approval.
a71c37599888d8da2aa9170d69bed87b2fbaa084, version1.6.0.git diff --check, andversionctl release-check --jsonpassed. Independent review passed on this head with no blocking findings. All 1,004 tests and GitHub proof passed.CI and review.