rdmsm4x — replicantDB resume/handoff state and auto-resume after reboot
2026-08-31 16:30 EDT · rdmsm4x · claude@rdmsm4x · ticket TASK-20260831-12
Rich asked this session to be planned/documented for resume and handoff, and to auto-resume after a reboot. Both are done. No application code changed; this is state, documentation and one login agent.
What changed on this host
| Path | Change |
|---|---|
~/Library/LaunchAgents/com.eastcoastscience.claude-resume-replicantdb.plist |
NEW. Login agent,
RunAtLoad, LimitLoadToSessionType=Aqua. Runs
resume_pinned_on_login.zsh replicantdb. Deliberately NOT
bootstrapped — see below. |
~/dev/fleet/ops/resume/PINNED-SESSION-replicantdb |
NEW. Pins session
cd4dc58c-7fc9-4155-92a9-174a9517ddcc, cwd
~/dev/apps/replicantDB. Re-pin by editing this file
only. |
~/dev/fleet/ops/resume/archive/superseded-20260831/ |
NEW. Holds
resume_pinned_session.zsh (mine, superseded within the
minute) plus a README saying why. Moved, not deleted. |
~/dev/apps/replicantDB/SESSION-STATE.md |
Revised — new §4a, re-measured corpus
figures, new verification rows, collision recorded. Commit
74591fa. |
~/dev/fleet/ops/resume/ is untracked in git and was left
that way: peer sessions were writing it during this change, and
committing the directory would have swept their in-flight files into my
commit. The file inventory above is the reconstruction record.
Commands run
plutil -lint <both plists>
DRY_RUN=1 zsh resume_pinned_on_login.zsh replicantdb
launchctl bootstrap gui/501 <DRYRUN twin plist> ; launchctl bootout gui/501/<twin>
launchctl print gui/501/com.eastcoastscience.replicantDB.daemon | grep runatload
sqlite3 "$HOME/Library/Application Support/replicantDB/replicantdb.sqlite" \
"SELECT (SELECT count(*) FROM files), (SELECT count(*) FROM file_hashes), ..."Verification evidence
- Daemon restarts itself:
launchctl printreportsproperties = runatloadforcom.eastcoastscience.replicantDB.daemon, pid 91373,state = running, up 1h51m. Read from launchd's view of the loaded job, not from the plist file. - Resume agent's launchd wiring: verified with a
throwaway twin of the plist — label suffixed
-DRYRUN,EnvironmentVariables DRY_RUN=1. Bootstrapped;resume-replicantdb.loggained exactly the two expected lines at 16:23:19 under launchd's own execution; twin booted out and confirmed absent fromlaunchctl list. This is why no duplicate Terminal opened. A peer session that bootstrapped its real agent got a live secondclaude --resumeon its own still-running transcript. The twin costs nothing and avoids that. - Transcript resolution, with negative controls:
DRY_RUN=1resolves the 37 MB transcript forcd4dc58c…; a bogus session id logsSTALE PINand exits 0; a missing pin file logs a different message and exits 0; no argument exits non-zero. The check can fail, so its passing is informative. - Corpus, 16:26 EDT: 2,025,107 files · 8,153 hashed · 229,145 purposed · 330,960 classified · 1,694,147 CANDIDATE. Database 5.8 GB. Sampled twice 45 s apart: purposes +1,500, categories +731, file count static. The moving counters are the proof the daemon works — a static file count alone is indistinguishable from a stall.
Not verified, stated as such
The osascript → Terminal dispatch has not run
for this agent, because testing it means either rebooting or
opening a duplicate session on the live transcript. It is the same code
path the Tyrell and rdreceipt agents have executed for real, which is
evidence about the script and not about this agent. Recorded as ASSUMED
in SESSION-STATE.md §4.
Found while measuring, filed not fixed
ISSUE-20260831-14 — only 8,153 of 2,025,107 files are
hashed and the number is static while classification advances. Dedup
depends entirely on hashing. Three candidate causes recorded and
undistinguished; not diagnosed. No dedup or reclaimable-space
figure is quotable until it is.
How to undo
launchctl bootout gui/501/com.eastcoastscience.claude-resume-replicantdb 2>/dev/null
rm ~/Library/LaunchAgents/com.eastcoastscience.claude-resume-replicantdb.plist
rm ~/dev/fleet/ops/resume/PINNED-SESSION-replicantdbThe daemon agent predates this change and should be left alone.
Outstanding, Rich's
ISSUE-20260831-10— CloudKit container has never existed; needs the Apple Developer account.DEC-20260831-04— 39% staging debris inflating reclaimable-space figures.- Credential rotation. Time Machine holds pre-remediation state; deletion is not remediation.