Skip to content

feat(v0.11): Stuck Session Alerts — detect and surface session.stuck events in real time #29

@vivekchand

Description

@vivekchand

Problem

From the same real-world deployment:

"There were stretches where I had no idea if it was making progress, stuck in a loop, or waiting on a hanging install process."

OpenClaw emits session.stuck diagnostic events when a session exceeds expected duration. ClawMetry receives these via the log stream but does nothing with them.

What's Already There

What's Missing

When a session.stuck event appears in the log stream:

  1. Top banner — persistent alert with session key, stuck duration, link to transcript. Appears on every tab. Dismissable.
  2. Sessions tab badge — count of currently stuck sessions
  3. Red highlight on stuck session rows

Alert clears automatically when a terminal session.state event arrives for that session.

Where to Change

1. Add banner HTML — one <div id="stuck-banner"> just after the nav bar closes, before the first <div class="page"> block.

2. In startLogStream() JS (line 5202, logStream.onmessage) — add a check: if the parsed line contains session.stuck, call showStuckAlert(sessionId, ageMs).

3. Add showStuckAlert() function — updates the banner, increments a badge on the Sessions nav tab.

4. Clear on terminal state — same onmessage handler: if line contains session.state with a terminal value, call clearStuckAlert(sessionId).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions