Protect the archive destination
The verified 30-day cutoff matched zero fresh rows. Choose a cutoff from real timestamps, not convenience.
Say the ritual as one unit
Dry-run, export, prune. Never skip one and never change the order.
Count without changing the database
armaraos trajectory prune <AGENT> --dry-run --older-than-days 30
The verified command predicted zero deletions.
Write the archive before deletion
armaraos trajectory export <AGENT> -o steps-archive.jsonl
The real archive was 1,675 bytes and contained both trajectory rows.
Prune only when the count is understood
armaraos trajectory prune <AGENT> --older-than-days 30
Choose exactly one cutoff
armaraos trajectory prune <AGENT> --dry-run --before-recorded-at <UNIX_SECONDS>
Day cutoff means strictly before now minus full UTC days. Timestamp cutoff means strictly before that Unix second.
Know what survives
Prune removes trajectory detail rows only. Graph trajectory nodes remain, and both systems share ainl_memory.db.
Verify the prediction
armaraos trajectory list <AGENT> --limit 5
The verified list still contained both fresh rows, exactly matching the zero-row prediction.
Check it / stop after preview
Predict zero again.
Repeat the 30-day dry-run and confirm the fresh course rows remain. Do not broaden the cutoff for practice.
Prune is a permanent database delete with no undo. Dry-run, export, prune, in that order, every time.
Troubleshooting for this sitting
| What you see | Likely cause | What to do |
|---|---|---|
| Unexpected preview count | The cutoff is too broad. | Stop and inspect timestamps. |
| Both selectors fail | They are mutually exclusive. | Choose one. |
| Archive is empty | No rows were exported. | Recheck list before pruning. |
| Graph nodes remain | Only detail rows are pruned. | Inspect graph memory separately. |