Install
openclaw skills install gateway-restart-resumeUse when an OpenClaw agent is asked from any gateway-backed medium to restart, stop, reload, update, or repair the gateway and the agent must reply again after the gateway comes back.
openclaw skills install gateway-restart-resumeGitHub: https://github.com/udaymanish6/openclaw-restart-resume
ClawHub: https://clawhub.ai/udaymanish6/gateway-restart-resume
Gateway restart is a conversation-continuity problem. An in-gateway OpenClaw agent that restarts the gateway kills the runtime that would normally send the follow-up reply. Before taking any gateway-killing action, create a durable resume path that can verify recovery and report back through the same medium, conversation, channel, thread, or user route.
Before any in-gateway restart attempt, verify that the current runtime exposes a durable control path:
cron or an equivalent durable task tool for the resume callback.gateway or exec for the restart action.announce delivery, the original session route, or an approved channel send mechanism.If any required path is unavailable, do not restart. Reply in the current conversation with a short degraded status:
I did not restart the gateway because this runtime cannot create a durable post-restart callback first.
Needed before retry: cron/task callback access plus gateway/exec restart access.
Never replace this preflight with best-effort memory, a note in the transcript, or an instruction to yourself. The callback must be durable outside the current in-gateway turn.
Use this skill when:
Do not use this skill for external shell operators that can survive the restart themselves, except as a checklist for user-facing notifications.
Classify execution context.
Confirm permission.
Capture reply target.
Send pre-restart acknowledgement.
Create durable resume callback before restart.
Restart only after the callback exists.
Resume callback verifies recovery.
Send final reply.
gateway.restart, restart ok, restart restart ok, method names, JSON payloads, or internal reason text into the user-facing reply.The durable callback should carry a minimal payload:
{
"reason": "user-requested gateway restart",
"agentId": "<agent-id>",
"reply": {
"medium": "<discord|slack|matrix|sms|email|web|cli|acp|cron|other>",
"account": "<account-id-if-needed>",
"target": "<conversation-or-addressable-target>",
"channelId": "<channel-id-if-needed>",
"threadId": "<thread-id-if-needed>",
"userId": "<user-id-if-needed>",
"messageId": "<original-message-id-if-needed>"
},
"verify": [
"gateway status",
"health",
"original medium connectivity"
],
"createdAt": "<iso-timestamp>"
}
Sanitize or omit fields that are not needed for routing. Never include secrets, full config, env files, transcript bodies, or private message contents.
Use the local OpenClaw version's native tools when available. Equivalent checks are acceptable.
openclaw gateway status
openclaw health
openclaw channels status --probe
When the restart was part of an update or plugin repair, also verify the relevant narrow checks, for example:
openclaw doctor --non-interactive --no-workspace-suggestions
openclaw plugins doctor
openclaw tasks audit
Do not claim the restart succeeded unless fresh verification output supports it.
Prefer this operator report for human-facing media that can handle multi-line messages.
Output must be written as a clean operator status, not as a tool transcript.
Do not include:
gateway.restart.Before restart:
Restarting the OpenClaw gateway now.
I will reply here after it comes back.
After success:
Gateway restart complete.
Verified:
- Gateway: back online
- Discord: reply path restored
- Resume: this follow-up reached the original thread
Duration: <duration or "not recorded">
Warnings: <none or one short warning>
After degraded recovery:
Gateway restart completed, but verification is degraded.
Passed:
- <passed check>
Needs attention:
- <failed or warning check>
Safest next action: <next step>.
After failure:
Gateway restart did not verify cleanly.
Failed check: <check>
Last known state: <state>
Safest next action: <next step>