Skip to content

v2026.3.1 regression: pre-compaction memory flush fires on every message (aggressive compaction threshold) #32317

@mcboty

Description

@mcboty

Description

After upgrading from 2026.2.26 to 2026.3.1, the pre-compaction memory flush fires on every single user message in TUI sessions, even seconds apart. Previously (2026.2.26), compaction was spread hours apart — now it triggers on nearly every turn.

Steps to Reproduce

  1. Run openclaw tui on v2026.3.1
  2. Have a session with moderate context (heartbeats, tool calls, etc.)
  3. Once context grows, the Pre-compaction memory flush system message fires after every user message

Expected Behavior

Compaction should trigger occasionally when context is genuinely full, not on every turn. On v2026.2.26, the same session type saw ~3 compactions per day. On v2026.3.1, we hit 6+ compactions in a single session within ~1 hour.

Actual Behavior

  • Memory flush system message appears after every single user message
  • session_status shows 6 compactions with context at only 24% (49k/200k)
  • Logs confirm: yesterday (v2026.2.26) had 3 compaction starts all day; today (v2026.3.1) fires continuously

Additional Context

Environment

  • OpenClaw: 2026.3.1
  • Previous version: 2026.2.26 (no issue)
  • OS: macOS (arm64)
  • Node: v25.5.0
  • Channel: TUI (webchat)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions