Persistence & Maintenance
Compaction loses detail over time. Long conversations get summarized. Files are how your agent maintains continuity across sessions.
What to Persist
- Decisions and rationale — why you chose X over Y (AGENTS.md or MEMORY.md)
- Credentials and endpoints — in TOOLS.md, secrets in OS keychain
- Operational state — JSON for machine-readable, markdown for human-readable
- Lessons learned — daily notes, promoted to AGENTS.md when proven durable
What to Cut
- Blank template files with no content (they waste tokens every session)
- Duplicate rules across multiple files (pick one canonical location)
- Transient data that changes every run
- Stale state files that no longer reflect reality (rebuild from source, don't patch)
Workspace Backup
A common pattern is a backup cron that syncs critical workspace files hourly. The backup is silent when nothing changes and sends an alert on failure. Infrastructure should be invisible until it breaks.
For more on file architecture, deduplication, and token optimization, see Workspace Files & Bootstrap.
For the self-improvement pipeline that turns daily notes into durable rules, see Self-Improvement.