openclaw - 💡(How to fix) Fix Session closure metadata leaking into user-visible messages

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…

Code Example

SESSION FULLY ARCHIVEDExtended session April 14-20, 2026 (200K+ tokens) permanently closed. All systems stable. Ready for new session on April 21, 2026
RAW_BUFFERClick to expand / collapse

Problem: When a long-running session ends and a new one starts, internal session closure messages are being appended to user messages and displayed in the UI.

Example message user sees:

SESSION FULLY ARCHIVED — Extended session April 14-20, 2026 (200K+ tokens) permanently closed. All systems stable. Ready for new session on April 21, 2026

Expected behavior:

  • Session closure happens silently behind the scenes
  • User only sees their own message content
  • Internal metadata about session lifecycle is not visible to end users

Actual behavior:

  • Session closure messages are appended to user's outbound messages
  • Implementation details (token counts, session date ranges) are exposed
  • Creates confusion about whether messages are being received/processed

Impact:

  • Users see internal state that should be hidden
  • Creates perception that system is broken when it's actually working correctly
  • Violates separation between internal orchestration and user-facing interface

Environment:

  • OpenClaw v2026.4.14
  • Channel: Slack
  • Session type: Main agent (direct DM)

Reproduction:

  1. Run a long session until token budget is exhausted
  2. Session closes automatically
  3. User sends new message to start fresh session
  4. Session closure metadata appears in user's message view

extent analysis

TL;DR

The issue can be fixed by modifying the message processing pipeline to filter out internal session closure messages before they are displayed to the user.

Guidance

  • Investigate the message processing pipeline to identify where internal session closure messages are being appended to user messages.
  • Check the implementation of the session closure mechanism to ensure it is not inadvertently sending closure messages as part of the user's outbound messages.
  • Consider adding a message filtering mechanism to remove internal metadata and session lifecycle information from user-facing messages.
  • Review the OpenClaw v2026.4.14 documentation to see if there are any configuration options or APIs that can be used to control the visibility of internal session metadata.

Example

# Pseudo-code example of a message filtering function
def filter_internal_messages(message):
    if message.startswith("SESSION FULLY ARCHIVED"):
        return None  # Filter out internal session closure messages
    return message

Notes

The provided information suggests that the issue is related to the message processing pipeline, but the exact cause and solution may depend on the specific implementation details of OpenClaw and the Slack channel integration.

Recommendation

Apply a workaround by implementing a message filtering mechanism to remove internal session closure messages from user-facing messages, as the root cause of the issue is likely related to the message processing pipeline and may require a code change to fix.

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