Skip to content

[Bug]: Compaction does not write summary to daily memory — regression of #79022 #84695

Description

@bizzle12368239

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority user-facing bug, regression, or broken workflow.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.impact:data-lossCan lose, corrupt, or silently drop user/session/config data.impact:session-stateSession, memory, transcript, context, or agent state can drift or corrupt.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions