PlantOps BI

Your Agent Transcripts May Be Deleted After 30 Days

I found out the hard way that my personal agent history, the transcripts from my home lab, had a shelf life. The cleanup setting, cleanupPeriodDays, was still at its 30-day default. When I looked in mid-October, anything older than mid-September was gone from the machine. I don’t have a record of a warning, so assume you won’t get one.

If those transcripts are your only record of how you debugged something or why you made a call, that is a real loss.

Step One: Stop the Loss

I set cleanupPeriodDays to 3650. That is the whole fix for the deleting. Everything after it is about getting back what was lost and making sure it can’t happen again.

Getting Some of It Back

The laptop’s Time Machine snapshots still held older copies. I mounted the snapshots read-only and copied what they held into a separate recovered folder, then verified the copies with SHA-256. That brought back some real sessions, subagent logs and a memory file. Older history was simply gone.

The Backup

For this personal history I chose one encrypted copy on a machine at home, using restic, and nothing in the cloud for now. What matters is how the repository is locked down:

  • The laptop reaches it through a forced command that only allows restic in append-only mode.
  • Append-only means the laptop can add snapshots and cannot forget or delete them. I proved that by trying forget, which was refused. The small test snapshot I made while proving it stays forever.
  • Pruning can never run from the laptop. If the repository ever needs it, I run it on the server, and only after I decide to.

The job runs hourly, and the increments are small. It covers transcripts, every memory folder, the history file, my global instructions, settings, agents, skills, scheduled tasks and plans. It deliberately skips the main config file, local settings, session keys and shell snapshots.

The repository password lives in the Mac keychain. Copy it to a password manager, because if the Mac dies and the password dies with it, the backup is unreadable.

The Monthly Drill

A backup you haven’t restored is a hope. A daily job checks whether the last passing drill is 28 or more days old and, if so, runs one. A trip away just means it retries the next day.

The drill restores and compares hashes, and restic check reads back a sample of the data. The first pass matched every file it checked.

A Health Line

One script prints a single line: Backups: OK, then age of the last backup, the last drill date and result, and the retention setting. It goes red, with a notification, for an uncleared failure, no good backup in 48 hours, a failed or overdue drill (40 days), or retention under 3650.

The server being unreachable while I’m away does not count as a failure on its own. I’d rather not train myself to ignore the alert.