Problem
Local WebChat/TUI sessions seem too tightly bound to the current WebSocket / attached connection.
If my Mac sleeps, the frontend disconnects, or the page reconnects, OpenClaw often creates a new session instead of resuming the previous one. This makes local conversation continuity unreliable.
Why it matters
For laptop usage, sleep/wake is normal. A brief transport interruption should not silently create a fresh conversation and discard context.
This affects many users, not just edge cases:
- Laptop sleep/wake — lid close, walk away, come back → new session
- Gateway restart — config change, update,
openclaw gateway restart → new session
- Power outage / crash recovery — Gateway restarts → session gone
- Desktop users who shut down at night — next morning = fresh start every time
- Web UI page refresh — reconnect → new session
In all these cases, the service recovers fine, but the session does not.
Core argument
I am not arguing that OpenClaw should not run as a long-lived service. For agents, bots, and automation, a persistent gateway is a reasonable expectation.
The issue is: session continuity should not require uninterrupted runtime.
OpenClaw can run as a persistent service — but local users should not have to depend on 24/7 uninterrupted uptime just to preserve conversation continuity.
The questions worth considering:
- Should there be a continuity / resume mechanism for local users after a brief interruption?
- Should session identity be more persistent than the WebSocket connection?
- Should the system clearly tell the user: "you are resuming your previous session" vs "you are starting a new one"?
The gap is not in service availability — it is in session identity persistence. A stable session identity, tied to the user rather than the live socket, would make brief interruptions transparent.
Reproduction
- Run OpenClaw locally on macOS
- Keep Gateway running as LaunchAgent
- Start a conversation in WebChat or TUI
- Put the Mac to sleep (or trigger a frontend/WebSocket disconnect, refresh, or reconnect)
- Resume and reconnect
- Observe that a new session is often created instead of continuing the previous one
Current behavior
- WebChat/TUI session continuity appears to depend heavily on the current WebSocket / attached connection
- After disconnect/reconnect, the session may be discarded or replaced
- Reconnected users are effectively treated as a new conversation
Expected behavior
A short disconnect, page refresh, frontend reconnect, or sleep/wake cycle should not create a new conversation by default.
Instead, WebChat/TUI should try to:
- Resume the prior active session for that local user/client
- Preserve conversation continuity across brief transport interruptions
- Separate session identity from transient WebSocket connection state
Why Telegram feels better
Telegram seems more robust because the session key is tied to a stable identity (chat ID / user ID), not just a live socket.
That makes it much more resilient to temporary gateway pauses or reconnects.
It would be great if local WebChat/TUI could offer a similar continuity model.
Suggested improvement directions
- Bind WebChat/TUI to a stable local client identity instead of a single live WebSocket connection
- On reconnect, attempt to resume the most recent active session rather than silently creating a new one
- Add an explicit "resume previous session" behavior for local clients
- Persist session identity across sleep/wake, refresh, and brief reconnects
- Make the UI clearly indicate whether the user is rejoining an existing session or starting a new one
Environment
- Local macOS usage
- Gateway running as LaunchAgent
- WebChat / TUI frontend
- Issue is especially visible after sleep/wake or reconnect scenarios
Problem
Local WebChat/TUI sessions seem too tightly bound to the current WebSocket / attached connection.
If my Mac sleeps, the frontend disconnects, or the page reconnects, OpenClaw often creates a new session instead of resuming the previous one. This makes local conversation continuity unreliable.
Why it matters
For laptop usage, sleep/wake is normal. A brief transport interruption should not silently create a fresh conversation and discard context.
This affects many users, not just edge cases:
openclaw gateway restart→ new sessionIn all these cases, the service recovers fine, but the session does not.
Core argument
I am not arguing that OpenClaw should not run as a long-lived service. For agents, bots, and automation, a persistent gateway is a reasonable expectation.
The issue is: session continuity should not require uninterrupted runtime.
The questions worth considering:
The gap is not in service availability — it is in session identity persistence. A stable session identity, tied to the user rather than the live socket, would make brief interruptions transparent.
Reproduction
Current behavior
Expected behavior
A short disconnect, page refresh, frontend reconnect, or sleep/wake cycle should not create a new conversation by default.
Instead, WebChat/TUI should try to:
Why Telegram feels better
Telegram seems more robust because the session key is tied to a stable identity (chat ID / user ID), not just a live socket.
That makes it much more resilient to temporary gateway pauses or reconnects.
It would be great if local WebChat/TUI could offer a similar continuity model.
Suggested improvement directions
Environment