openclaw - 💡(How to fix) Fix [Bug]: Discord bot goes offline when SSH session disconnects (regression in 2026.5.18) [1 comments, 2 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#84249Fetched 2026-05-20 03:42:10
View on GitHub
Comments
1
Participants
2
Timeline
3
Reactions
1
Timeline (top)
commented ×1cross-referenced ×1labeled ×1

When an SSH session that started openclaw-tui (via openclaw chat) disconnects, the Discord bot goes offline and does not automatically reconnect until a new SSH session is established. This is a regression - previously the gateway would stay up and Discord would reconnect automatically.

Root Cause

When an SSH session that started openclaw-tui (via openclaw chat) disconnects, the Discord bot goes offline and does not automatically reconnect until a new SSH session is established. This is a regression - previously the gateway would stay up and Discord would reconnect automatically.

Code Example

May 19 17:40:40 node[878854]: [gateway] signal SIGTERM received               
  May 19 17:40:40 node[878854]: [gateway] received SIGTERM; shutting down       
  May 19 17:40:40 systemd[878827]: Stopped openclaw-gateway.service             
  May 19 17:42:51 systemd[880708]: Started openclaw-gateway.service

---
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

When an SSH session that started openclaw-tui (via openclaw chat) disconnects, the Discord bot goes offline and does not automatically reconnect until a new SSH session is established. This is a regression - previously the gateway would stay up and Discord would reconnect automatically.

Steps to reproduce

  1. SSH into the VPS
  2. Run openclaw chat (starts openclaw-tui attached to the SSH session's PTY)
  3. Disconnect SSH (close terminal or lose connection)
  4. Observe: Discord bot goes grey/offline within seconds
  5. Observe: Gateway process may restart but Discord does not reconnect
  6. SSH back in - Discord comes back online within seconds of login

Expected behavior

Gateway should remain running after SSH disconnect, and Discord should reconnect automatically within the normal reconnect backoff (30s-2min max).

Actual behavior

Key observations:

  • The SSH session's TTY becomes the controlling terminal for openclaw-tui
  • When SSH disconnects, openclaw-tui process dies and something triggers SIGTERM to the gateway
  • kill -9 on openclaw-tui does NOT trigger gateway SIGTERM - only SSH disconnect does
  • If SSH is kept open (e.g., running tail -f in a second session), the bot stays connected
  • This behavior appears to be new in 2026.5.18 or 2026.5.17

Changelog suspects:

  • Plugins/session-end: fire a typed session_end plugin hook... (2026.5.18)
  • TUI: exit immediately on Ctrl+C/SIGINT after gateway disconnect... (2026.5.18)
  • Gateway: overlap startup logging and plugin-service startup with channel
    sidecars... (2026.5.18)

Journal evidence:

  May 19 17:40:40 node[878854]: [gateway] signal SIGTERM received               
  May 19 17:40:40 node[878854]: [gateway] received SIGTERM; shutting down       
  May 19 17:40:40 systemd[878827]: Stopped openclaw-gateway.service             
  May 19 17:42:51 systemd[880708]: Started openclaw-gateway.service

Gateway restarted but Discord remained disconnected for extended period without SSH session.

Additional context:

  • systemctl --user status openclaw-gateway shows Restart=always is configured
  • The gateway process does restart, but Discord reconnection is unreliable
    without active SSH session
  • openclaw-tui is spawned by the openclaw chat command and becomes session
    leader on the SSH PTY

OpenClaw version

2026.5.18

Operating system

Ubuntu (VPS)

Install method

npm

Model

opencode-go/minimax-m2.7

Provider / routing chain

opencode-go

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Impact and severity

Affected - Discord Severity - blocks workflow Frequency - Always Consequence - Unable to interact with open claw unless SSH'd in to the VPS - not sustainable

Additional information

No response

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…

FAQ

Expected behavior

Gateway should remain running after SSH disconnect, and Discord should reconnect automatically within the normal reconnect backoff (30s-2min max).

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Discord bot goes offline when SSH session disconnects (regression in 2026.5.18) [1 comments, 2 participants]