openclaw - 💡(How to fix) Fix Discord group session freezes after compaction — reacts with 👀 but never responds [1 participants]

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…
GitHub stats
openclaw/openclaw#60866Fetched 2026-04-08 02:46:17
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

Error Message

  • No error message posted to the channel (unlike timeout/overload errors which do get posted)

Fix Action

Workaround

The only reliable workaround is to read the channel messages from the main session using message action=read and respond using message action=send. This works but loses all session context and tool capabilities for that channel.

RAW_BUFFERClick to expand / collapse

Bug Description

Discord group chat sessions become unresponsive after context compaction when the session reaches ~100K-130K tokens. The bot acknowledges incoming messages (adds 👀 reaction) but never generates a response. The session appears alive (not timed out, not errored) but is permanently stuck.

Steps to Reproduce

  1. Have an active Discord group session with heavy tool usage (file reads, edits, web searches, exec commands)
  2. Session grows to ~100-130K tokens over the course of a work session
  3. Context compaction triggers
  4. User sends a new message after compaction
  5. Bot reacts with 👀 (message acknowledged) but never responds
  6. All subsequent messages get 👀 but no response
  7. sessions_send from main session either times out or returns empty messages: []

Observed Behavior

  • Session shows totalTokens: 115000-130000 and abortedLastRun: false
  • sessions_list returns the session with messages: [] (empty last message)
  • The session is not dead — it's mapped correctly, reacts to messages, but the LLM call never completes or never starts
  • No error message posted to the channel (unlike timeout/overload errors which do get posted)
  • Creating a new channel (e.g. -2, -3 suffix) and starting fresh is the only workaround

Frequency

Extremely high. In our case, this happens on nearly every work session that exceeds ~2 hours of active use. Over 5 days (Mar 29 - Apr 3), we experienced this freeze in:

  • #ck-290326-2
  • #ck-300326 (twice, moved to -2 then -3)
  • #ck-300326-2
  • #ck-010426
  • #ck-010426-2 (new channel created Apr 3)
  • Two additional channels on Apr 3

The pattern is consistent: 1-2 hours of active work → compaction → freeze.

Workaround

The only reliable workaround is to read the channel messages from the main session using message action=read and respond using message action=send. This works but loses all session context and tool capabilities for that channel.

Environment

  • OpenClaw version: 2026.2.12
  • Model: anthropic/claude-opus-4-6
  • Channel: Discord (group sessions in private guild)
  • OS: Linux 6.8.0-100-generic (x64), 16GB RAM
  • Node: v22.22.0

Possibly Related Issues

  • #18194 — Session lost after compaction timeout
  • #11224 — Discord channel sessions bypass compaction
  • #36605 — Pre-compaction channel notification

Suggestion

  1. Add a timeout/watchdog for post-compaction message handling — if the session hasn't responded within N seconds after compaction, log a diagnostic and attempt recovery
  2. Surface the frozen state to the user (e.g. post "Session needs restart — type /reset or create a new channel")
  3. Add compaction diagnostics to sessions_list output (last compaction time, compaction status, post-compaction health)

extent analysis

TL;DR

Implement a timeout or watchdog mechanism for post-compaction message handling to detect and recover from frozen sessions.

Guidance

  • Investigate the sessions_send endpoint to determine why it times out or returns an empty response after context compaction.
  • Consider adding a diagnostic log for post-compaction message handling to identify potential issues.
  • Implement a recovery mechanism, such as logging a diagnostic and attempting to restart the session, if the session hasn't responded within a certain time frame after compaction.
  • Surface the frozen state to the user, allowing them to take action to recover the session.

Example

No code snippet is provided as the issue does not contain sufficient information to create a specific example.

Notes

The provided information suggests that the issue is related to the context compaction process, but the exact cause is unclear. The suggested workaround of reading and responding to channel messages using message action=read and message action=send loses session context and tool capabilities, making it a temporary solution.

Recommendation

Apply a workaround by implementing a timeout or watchdog mechanism for post-compaction message handling, as this is likely to provide a more reliable solution than the current workaround. This approach allows for detection and recovery from frozen sessions, reducing the impact on users.

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