Skip to content

Free AI Chat, Tools & Fun — Cloudflare edge gateway

No login. Streaming chat. Internal tools and image fun pages.

VibeWatcher
Go back

OpenClaw Memory Archiving, Compression, Reset, and Recovery Workflow

Published:

1. Purpose

This document records OpenClaw’s current workflow for long-term memory archiving, compression, pre-reset preparation, and post-reset recovery, so it can keep being used later without drifting.

After a round of work, a lot of information usually ends up scattered across chats, sessions, temporary files, and plain human memory. As time passes, that easily turns into situations like “we did this before, but can’t pick it back up” or “I remember this existed, but can’t find the proper entry point anymore.”

Once these workflows are written down in one place, future wrap-ups, handoffs, /new, and /reset can all follow the same process. You can tell where information should go, what still needs to be filled in, and where to resume when coming back.

This document can be used directly as an execution guide. Memory updates, project wrap-up, reset preparation, and post-reset recovery should all follow the rules here.


2. Current Official Memory Structure

The current long-term memory is fixed into four layers:

Their responsibilities are as follows.

2.1 sessions

2.2 memory/*.md

2.3 memory/topics/*.md

2.4 MEMORY.md

One-sentence rule:


3. What Should Go Into Long-Term Memory

The following content should go into memory/ or memory/topics/:

The following content should not go directly into long-term memory:


4. Archiving Workflow

“Archiving” here means formally writing the parts of the current round of work that are truly worth keeping into the memory system, rather than leaving them only in chat.

4.1 Daily Archiving Triggers

If any of the following happens on a given day, it should be archived:

If none of the above happens:

4.2 Daily Archiving Steps

  1. Review the key session or key file changes from that day
  2. Extract the following:
    • What was done
    • Current status
    • Key paths
    • Key decisions
    • Risks / pitfalls
    • How to continue next time
  3. Write it into memory/YYYY-MM-DD.md
  4. Add an index entry in MEMORY.md
  5. If it belongs to an existing topic, update the corresponding memory/topics/*.md

4.3 Large Project Archiving Steps

If the work involves cross-VPS, cross-claw, real deployment, real production launch, or long-term maintenance, use the large-project workflow:

  1. Collect evidence
    • Official path
    • Official entry point
    • Official script
    • Current official status
  2. Clean up junk
    • tmp
    • Temporary downloads
    • Temporary archives
    • One-off scripts
    • Debug leftovers
    • Miswritten files
  3. Write a date summary into memory/*.md
  4. Write or update a topic file in memory/topics/*.md
  5. Update the MEMORY.md index
  6. Confirm it has entered the backup pipeline

5. Compression Workflow

“Compression” does not mean deleting memory. It means organizing raw history into a structure that is easy to take over, reuse, and continue developing.

5.1 Anchors That Must Be Preserved During Compression

When compressing long-term memory, the following must not be lost:

  1. Current official status
  2. Official path / official entry point / official script
  3. Key decisions and why they were made
  4. High-frequency risks and pitfalls
  5. How to continue next time
  6. Traceback anchors (corresponding summary files or sessions)

5.2 Compression Triggers

If any of the following happens, a compression pass should be done:

5.3 Project-Level Compression Steps

  1. Read the relevant sessions or daily summaries
  2. Extract conclusions, status, anchors, and risks
  3. Write them into memory/YYYY-MM-DD.md or a project summary file
  4. Add an index entry to MEMORY.md

5.4 Topic-Level Compression Steps

  1. Gather 3 or more date summaries under the same topic
  2. Merge repeated conclusions
  3. Converge them into the current official status
  4. Write into memory/topics/*.md
  5. Make MEMORY.md point to the topic file first

6. MEMORY.md Index Protocol

MEMORY.md should only keep:

Example format:

Prohibited actions:


7. The Current Role of daily_chat/

The current rule has already settled:

Why:


8. Pre-Reset Workflow

When preparing for /new, /reset, or when the context is obviously getting too heavy, follow the steps below.

8.1 Pre-Reset Checklist

  1. Confirm that important conclusions from the day have already entered memory/ or memory/topics/
  2. Confirm that MEMORY.md already has the relevant index entry
  3. Confirm that any topic that needs to be kept long-term has been updated
  4. Update memory/RESET_REHAB.md
  5. Only then perform the reset

8.2 Minimum Actions Before Reset

If time is tight, do at least these 4 steps:

  1. Update memory/YYYY-MM-DD.md (if there was important progress today)
  2. Add an index entry in MEMORY.md
  3. Update memory/RESET_REHAB.md
  4. Then reset

8.3 Prohibited Actions Before Reset


9. Post-Reset Recovery Workflow

After a reset, do not start by scrolling old sessions. The current official approach is to start from the recovery entry point.

9.1 Reading Order

Read in this order:

  1. MEMORY.md
  2. memory/topics/*.md
  3. memory/YYYY-MM-DD.md
  4. sessions

9.2 Why This Order

Read MEMORY.md first

Use it to quickly locate what long-term topics currently exist, what important changes happened recently, and where to continue reading.

Then read topics

Use them to restore the current official understanding quickly, instead of getting trapped in date-based history.

Then read date summaries

Use them to fill in the recent evolution details.

Only replay sessions at the end

Go into session history only when raw evidence or full context is actually needed.

9.3 Minimum Recovery Actions

If time is tight after reset, the minimum is:

  1. Read MEMORY.md
  2. Read memory/topics/backup.md
  3. Read memory/topics/team-claw-map.md
  4. Then read the topic that matches the current issue

10. The Role of RESET_REHAB.md

memory/RESET_REHAB.md is not a complete history. It is a recovery entry point.

Its responsibilities are:

It does not replace memory/*.md, topics, or sessions.

Its job is to shorten the reading path after reset.


11. The Relationship Between Backups and the Memory System

Current long-term retention has already shifted to a two-track structure:

Why:

  1. The entire workspace is no longer synced, to avoid junk, cache, and mistakenly downloaded projects polluting long-term backups
  2. Raw details are handled through session replay
  3. High-value long-term information goes into memory/
  4. Keeping only MEMORY.md is not enough, because that leads to “an index pointing to empty air”

Current principles:


12. Supplemental Rules for Stage Wrap-Up

It has now been formally fixed that after each claw finishes a project or stage, it must proactively complete the following:

  1. archive
  2. retro
  3. cleanup

A stage receipt should include at least:

The meaning of this rule is:


13. One-Line Execution Version

Daily Version

Important progress happened → write memory/YYYY-MM-DD.md
Add an index entry in MEMORY.md
If there is an existing topic → update the corresponding topic

Project Wrap-Up Version

Collect evidence first
Clean up junk next
Then write memory/
Then write / update topics
Then update MEMORY.md
Finally confirm it is in backup

Pre-Reset Version

First confirm important information has been written down
Update MEMORY.md
Update RESET_REHAB.md
Then reset

Post-Reset Version

Read MEMORY.md first
Then read topics
Then read date summaries
Look at sessions only at the end


14. Current Overall Principles

The overall principles of the memory system are now fixed as follows.

  1. Text > Brain
  2. sessions keep the raw record
  3. memory/*.md keep summaries
  4. memory/topics/*.md keep topic overviews
  5. MEMORY.md keeps only the index
  6. Long-term information goes into memory/ in a unified way; daily_chat/ is no longer treated as an official long-term entry point
  7. Before reset, update memory first, then update the recovery entry point
  8. After reset, go through topics first instead of starting from old sessions
  9. When a project ends, cleanup comes first, then archiving, then retrospective
  10. Without evidence, it does not count as formally completed

#OpenClaw #Memory #Workflow #Reset #Archive


Share this post on:

Previous Post
Secure Token Delivery from a Public Repo: GitHub Actions + age-encrypted Releases + VPS Auto-Health & Cleanup
Next Post
How I Turned a Few VPS-Based OpenClaw Nodes into a Real Workflow with Tailscale
🎵