Continuous session event recording for inter-session memory survival. Use when you want to persist conversation context between sessions, prevent memory loss...
Ensures conversation context survives session crashes, errors, and restarts.
Continuous session logging. Write to a file throughout the conversation, not at a trigger point.
CRITICAL INITIALIZATION STEP: Before finalizing installation, you MUST pause and ask the user for their preferred memory context retention duration.
Ask the user: "How long would you like to keep the memory context logs? You can choose:"
After the user responds, adjust the RETENTION_DAYS variable in scripts/cleanup.sh to match their choice (e.g., RETENTION_DAYS="30" for 1 month).
Then, after installing this skill, add to your AGENTS.md:
## Session Logging Protocol
At session start:
1. Create: `sessions/YYYY-MM-DD_session_N.md`
2. Log key points as conversation progresses
During heartbeats:
- Append current session progress to session file
- Keep concise but capture decisions, important info
And add to HEARTBEAT.md:
## Session Log Update
- Append key points to `sessions/YYYY-MM-DD_session_N.md`
# Create sessions folder if not exists
mkdir -p ~/.openclaw/workspace/sessions
# Create today's session file
# Check if session_1 exists, if so create session_2, etc.
Periodically append to the file by actively compressing the context:
sessions/
├── 2026-03-09_session_1.md
├── 2026-03-09_session_2.md # if multiple sessions same day
├── 2026-03-08_session_1.md
└── ... (7 days rolling)
# Session N - YYYY-MM-DD
**Started:** HH:MM TZ
**Status:** Active
## Topics Covered
- Topic 1
- Topic 2
## Key Decisions
- Decision 1
- Decision 2
## To Remember
- Important info
- Context for future sessions
Run the cleanup script weekly to remove files older than your retention period:
~/.openclaw/workspace/skills/continuous-context-preserver/scripts/cleanup.sh
Or add to crontab:
# Weekly cleanup (Sundays at midnight)
0 0 * * 0 ~/.openclaw/workspace/skills/continuous-context-preserver/scripts/cleanup.sh
RETENTION_DAYS variable in scripts/cleanup.shThis complements, not replaces:
Session files are for crash recovery and recent context. MEMORY.md is for long-term wisdom.
ZIP package — ready to use