Files
esh-pfi-infrastructure/persistent-memory.d/2026-09-21-using-directory-mtime-as-a-liveness-test-when-pruning.md
T

611 B

[2026-09-21] Using directory mtime as a liveness test when pruning session scratchpads

Using directory mtime as a liveness test when pruning session scratchpads — find /tmp/claude-1000 -mindepth 2 -maxdepth 2 -type d -mtime +7 deleted an ACTIVE session's working directory. A directory's mtime does not change when files are written into its SUBDIRECTORIES, so a session writing continuously to <id>/tasks/ looks 7+ days idle at <id>/. Four safety assertions passed; none of them asked whether the liveness test was sound. Use the deepest recent file, or cross-reference running claude PIDs.