OpenClaw merged a high-priority session recovery fix for group chats late Sunday. PR #89045, titled "fix: recover terminal session status on visible inbound turns," landed on June 28 at 22:45 UTC.
The change targets a rough failure mode for operators who keep OpenClaw running inside shared channels. If a group chat session entered a terminal state such as failed, timeout, or killed, later human messages could be accepted by the dispatch path but never start a fresh AI turn. From the user's point of view, the agent simply stopped answering until someone manually reset the session.
That is exactly the kind of reliability issue that matters in real deployments. A group channel is often where teammates notice incidents, ask follow-up questions, or hand an agent new work. Silent no-op behavior is worse than a visible error because it gives operators nothing to debug.
What Changed
The merged fix adds recovery behavior for visible inbound turns. When a normal human-facing message reaches a session stuck in a recoverable terminal state, OpenClaw clears the stale lifecycle fields while keeping the same sessionId and transcript continuity.
The PR also handles the reply-operation side of the deadlock. If turn admission is skipped because a stale reply operation is still registered for a terminal session, OpenClaw force-clears that leftover operation and retries admission once. A race guard prevents a second concurrent recovery from canceling a fresh recovery that is already in flight.
The same terminal recovery logic was mirrored into the agent API dispatch path, and OpenClaw now logs a structured warning when a visible channel turn completes with no queued final reply and zero delivered output counts.
Why It Matters
This fix changes the operator experience in three practical ways:
- A visible message can revive a failed group chat session without requiring
/new. - The transcript is preserved, so recovery does not throw away useful conversation history.
- Future silent-drop patterns should be easier to spot because zero-count visible dispatches now emit diagnostics.
The PR labels tell the story too: it was marked P1, with merge-risk labels for both session state and message delivery. That combination is a strong signal that the bug touched the core promise of channel agents: when a person talks to the agent, the message should either produce a response or fail in a way humans can see.
Validation
The PR included before-and-after real runtime proof using the production dispatch, session, and reply registry path. Before the fix, the test driver timed out behind a stale terminal reply operation. After the fix, dispatch returned a queued final reply, the stale operation was cleared, and the same session ID was reused.
Focused tests also covered session recovery, dispatch retry behavior, agent API recovery, concurrent recovery guardrails, and the new zero-count warning. For OpenClaw users running group chat agents, this is a quiet but important improvement: failed sessions should now get unstuck through normal visible use instead of going dark.
