Install
openclaw skills install context-persistenceSolve cross-session context storage and sync problems. Use when (1) isolated sessions (cron/subagent/heartbeat) lack context from main session, (2) long-running tasks need progress tracking across sessions, (3) multiple sessions need shared state, (4) users report "agent doesn't remember what happened", (5) designing memory/progress systems for AI agents. Triggers on "context sync", "session memory", "progress tracking", "cross-session state", "memory mechanism", "persist progress".
openclaw skills install context-persistenceDesign and implement persistent context systems that survive session boundaries.
OpenClaw has multiple session types with different context access:
| Session | Memory Files | History | Cron Context |
|---|---|---|---|
| Main DM | ✅ All injected | ✅ Full | N/A |
| Group Chat | ❌ Not loaded | ✅ Partial | N/A |
| Cron (isolated) | ❌ None | ❌ None | ✅ Payload only |
| Heartbeat | ❌ None | ✅ Partial | N/A |
| Subagent | ❌ None | ❌ None | ✅ Task only |
Result: State created in one session is invisible to others unless persisted to files.
Files are the only cross-session communication channel. In-memory state dies with the session. Files survive.
For tasks spanning multiple sessions (source code reading, data analysis, etc.)
See references/progress-tracking.md for full template.
Essential elements:
# <Task> Progress
- Total: X items
- Completed: Y items
- Progress: Z%
## Completed List (dedup)
## Current Position / Next Steps
## Key Findings
Isolated cron sessions have NO access to workspace memory. Solutions:
See references/cross-session-sync.md for patterns.
The AGENTS.md startup sequence ensures context loading:
1. Read SOUL.md (persona)
2. Read USER.md (who you help)
3. Read memory/YYYY-MM-DD.md (today + yesterday)
4. If main session: also read MEMORY.md
This is the ONLY automated context loading. Everything else must be explicit.
When designing context for a new task: