openclaw - 💡(How to fix) Fix [Bug]: Compaction does not write summary to daily memory — regression of #79022

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • No error visible in chat or logs — the flush silently fails

Code Example

"compaction": {
  "mode": "safeguard",
  "keepRecentTokens": 30000,
  "reserveTokensFloor": 30000,
  "identifierPolicy": "strict",
  "recentTurnsPreserve": 10,
  "memoryFlush": {
    "enabled": true,
    "softThresholdTokens": 8000,
    "prompt": "We are nearing a context limit. Summarize our progress today into memory/YYYY-MM-DD.md. If the file already exists, APPEND new content only."
  },
  "maxHistoryShare": 0.8,
  "notifyUser": true
}
RAW_BUFFERClick to expand / collapse

Bug Description

Compaction fires and shows the compaction message in chat, but the memory-flush summary is NOT written to memory/YYYY-MM-DD.md.

This is a regression of #79022 (closed May 7 2026 as fixed).

Environment

  • OpenClaw version: 2026.5.18+
  • Channel: Telegram
  • Model: minimax-portal/MiniMax-M2.7

Configuration

"compaction": {
  "mode": "safeguard",
  "keepRecentTokens": 30000,
  "reserveTokensFloor": 30000,
  "identifierPolicy": "strict",
  "recentTurnsPreserve": 10,
  "memoryFlush": {
    "enabled": true,
    "softThresholdTokens": 8000,
    "prompt": "We are nearing a context limit. Summarize our progress today into memory/YYYY-MM-DD.md. If the file already exists, APPEND new content only."
  },
  "maxHistoryShare": 0.8,
  "notifyUser": true
}

Steps to Reproduce

  1. Continue a Telegram conversation until compaction fires (~170k tokens)
  2. Observe compaction message appears: 🧹 Compacting context (433 messages) so I can continue without losing history…
  3. After compaction completes, check memory/YYYY-MM-DD.md
  4. Expected: A summary of the compacted conversation has been appended
  5. Actual: No summary written — file is unchanged from before compaction

Expected Behavior

When compaction fires, the memory-flush turn should write a summary of the conversation to memory/YYYY-MM-DD.md before the transcript is compacted.

Additional Context

  • Manual daily memory writes work correctly (via heartbeat, edit tool, etc.)
  • The issue is specific to the automatic flush on compaction
  • No error visible in chat or logs — the flush silently fails
  • Connected issues:
    • #79022 (closed fix — may have regressed)
    • #45608 (feature: /new and daily reset should also get memory flush — still open)
    • #63664 (session flush blocks write tool completely during compaction — P1, open)
    • #66612 (memory flush write sandbox blocks SESSION_HANDOFF.md — open)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Compaction does not write summary to daily memory — regression of #79022