-
-
Notifications
You must be signed in to change notification settings - Fork 79.2k
Telegram channel stuck not-running with restartPending=true while Bot API probe succeeds; gateway restart kills stale process and recovers #90901
Copy link
Copy link
Closed
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Metadata
Metadata
Assignees
Labels
P1High-priority user-facing bug, regression, or broken workflow.High-priority user-facing bug, regression, or broken workflow.clawsweeper:needs-live-reproClawSweeper needs live local, crabbox, or manual validation to confirm this issue.ClawSweeper needs live local, crabbox, or manual validation to confirm this issue.clawsweeper:needs-maintainer-reviewClawSweeper marked this issue as needing maintainer review before automation.ClawSweeper marked this issue as needing maintainer review before automation.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.impact:crash-loopCrash, hang, restart loop, or process-level availability failure.Crash, hang, restart loop, or process-level availability failure.impact:message-lossChannel message delivery can be lost, duplicated, or misrouted.Channel message delivery can be lost, duplicated, or misrouted.issue-rating: 🐚 platinum hermitGood issue quality with a plausible reproduction path needing some confirmation.Good issue quality with a plausible reproduction path needing some confirmation.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Summary
Telegram stopped responding even though the Telegram Bot API credential probe succeeded. The Gateway itself was reachable and healthy, but the Telegram channel runtime was stuck in
running=false/healthState=not-running/restartPending=true.Running
openclaw gateway restartrecovered the channel. During restart, OpenClaw reported that it killed one stale gateway process before restarting the LaunchAgent.This looks different from #90525: there was no stale Telegram direct session with
status=runningandhasActiveRun=false.Environment
2026.6.1 (2e08f0f)v25.4.0pollingObserved behavior
Telegram stopped replying. A read-only channel health check showed that Telegram was configured and its Bot API probe succeeded, but the channel runtime itself was not running:
{ "configured": true, "running": false, "lastStopAt": null, "lastError": null, "probe": { "ok": true, "elapsedMs": 1973 }, "mode": "polling" }The account-level status showed the same lifecycle inconsistency:
{ "accountId": "default", "enabled": true, "configured": true, "running": false, "connected": true, "restartPending": true, "reconnectAttempts": 0, "lastError": null, "mode": "polling", "healthState": "not-running" }Gateway health itself was OK and the Telegram plugin was loaded:
{ "ok": true, "plugins": { "loaded": [ "telegram" ], "errors": [] }, "channels": { "telegram": { "enabled": true, "configured": true, "running": false, "connected": true, "restartPending": true, "reconnectAttempts": 0, "lastError": null, "mode": "polling", "healthState": "not-running" } } }I also checked whether this matched #90525. It did not:
{ "tasks": { "active": 0, "byStatus": { "queued": 0, "running": 0 } }, "telegramDirectSessions": 1, "telegramDirectByStatus": { "done": 1 }, "staleTelegramDirectRunningNoActiveRun": 0 }Recovery
Running a Gateway restart recovered the Telegram channel:
After restart:
{ "configured": true, "running": true, "lastStopAt": null, "lastError": null, "probe": { "ok": true, "elapsedMs": 424 }, "mode": "polling" }Account-level status also cleared
restartPending:{ "accountId": "default", "enabled": true, "configured": true, "running": true, "restartPending": false, "reconnectAttempts": 0, "lastError": null, "mode": "polling" }The user confirmed Telegram recovered normally after this restart.
Expected behavior
If Telegram Bot API probe succeeds and the plugin is loaded, the Gateway should either:
not-running.The channel should not remain indefinitely in
restartPending=truewithrunning=false,lastError=null, andreconnectAttempts=0until a manual Gateway restart clears a stale process.Actual behavior
The Gateway remained healthy and the Bot API probe succeeded, but the Telegram channel runtime stayed
not-runningwithrestartPending=true. Telegram replies did not recover until a manual Gateway restart killed a stale gateway process.Why this seems like a Gateway/channel lifecycle bug
This does not look like a simple Telegram/network outage:
lastErrorstayednull.reconnectAttemptsstayed0.restartPendingand restored service.This suggests a Gateway/channel lifecycle or LaunchAgent process-state inconsistency: the channel needed a restart, but the runtime did not converge back to a running state.
Possible fix direction
enabled/configuredandrestartPending=true, ensure the runner is actually restarted or mark the restart as failed with an actionablelastError.openclaw status,openclaw channels status, oropenclaw doctor.probe.ok=true,running=false,restartPending=true, andlastError=nullpersists indefinitely.