ok shim writes a ledger entry at launch ok startedAt is UTC, not the local clock labelled Z ok AGENT_LEDGER_ID reaches the launched process ok live session classified ALIVE-WORKING ok entry survives SIGKILL of the session process ok killed session classified ORPHANED ok cleanly finished session classified FINISHED ok clean worktree reports 0 uncommitted files ok dirty worktree reports 2 uncommitted files ok orphan notified once, never repeated ok no notification without abandoned uncommitted work ok interactive launch is hosted in tmux ok session survives the death of its terminal ok tmux socket still resolves after terminal death ok orphaned-terminal session classified DETACHED-ALIVE ok recovery command prints a reopen command for it ok tmux-hosted session still lands in agent.slice (confine-agent-592077-29642.scope) ok launch survives an unwritable ledger directory ok launch survives a corrupt ledger library ok nested launch records its parent session before the tmux handoff ok control byte in a ref name still yields parseable JSON ok lookalike env var does not resurrect a dead session ok prune removes exactly the one stale FINISHED entry ok stale FINISHED entry is gone ok recent FINISHED entry survives ok live entry (finishedAt null) is never pruned ok a file removed before it's read is skipped, not fabricated or fatal ok a shim-bypassing launch produces exactly one ledger entry ok the entry names the runtime process it was adopted from ok the first session id wins, so --resume reaches the conversation ok an adopted session with a live process classifies alive, not lost ok SessionEnd marks an adopted session finished, so retention can reclaim it ok an enrolled session is updated, not duplicated ok the shim-born entry still receives its session id ok a pid whose start time disagrees never resolves as live ok a session this shell can inspect is never left unenrolled ok a launcher that never touched the shim is still enrolled, as itself ok the entry says it came from discovery, not from a launcher ok startedAt is real UTC: the age is positive and matches the process ok a second sweep recognises the session it already enrolled ok both writers emit the same fields ok a human ledger birth records its tmux target atomically ok with no ai-title, the opening request is the title ok the runtime's own session title wins over the raw opening prompt ok the activity is the last thing the session did ok a factory run is not reported as the user's own launch ok a codex session whose process is gone is closed, not orphaned forever ok a dead claude session is never auto-closed ok a dead claude row with no transcript and no session id is closed ok a pid-less claude row is left open, not closed as a phantom ok a daemon subcommand is never enrolled as a session ok no carrier of another runtime, nor a wrapper around it, is taken for the session ok a resume, a recycled pid and a pid-less row are never one identity skip a dtach-wrapped session reports its socket (dtach not installed here) ok a tmux-wrapped session reports its pane's session name ok a tmux session that bypasses the shim is enrolled with its watch target ok the recovery CLI can reopen a shim-bypassing tmux session ok an unwrapped session claims no multiplexer ok idle time is read from the transcript, not the CPU counter ok a transcript filed under another project directory is still resolved ok a busy session with a silent transcript reads as idle, without a CPU claim ok a sweep prunes a hookless runtime's expired row and keeps one inside the window ok a documented reason is stored in the ledger's own prose ok the catch-all reason leaves the field absent, and still closes the row ok a reason the runtime adds later is passed through, never dropped ok an ambiguous documented reason is passed through, never glossed ok a payload with no reason invents none ok every tmpjail shim name is a covered runtime, and no other ok agy is a covered runtime ok opencode is a covered runtime ok grok is a covered runtime ok kiro-cli is a covered runtime ok a dead session's uncommitted work is snapshotted onto its own ref ok the rescue leaves the working tree exactly as the dead session left it ok the snapshot carries the modified and untracked files, and no ignored one ok the ledger records where the rescued work went ok a second sweep re-snapshots nothing ok the first snapshot is left alone ok restoring the snapshot brings back the modified and the untracked file ok a session whose process is still alive is never rescued ok a session with no recorded pid is never rescued ok the rescue ref survives removal of the worktree it came from 81 passed, 0 failed