# Gateway Restart

> Graceful gateway restart — waits for active queries and cron jobs to complete

- Skill: `technickai-openclaw-config/gateway-restart` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add technickai-openclaw-config/gateway-restart`
- Raw SKILL.md: https://api.skillmd.com/api/skills/technickai-openclaw-config/gateway-restart/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: TechNickAI (https://skillmd.com/u/technickai-openclaw-config)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/technickai-openclaw-config/gateway-restart

---


# Gateway Restart Skill 🔄

Gracefully restarts the OpenClaw gateway by waiting for active queries and cron jobs to
complete before restarting. Prevents mid-conversation interruptions.

**Users say things like:**

- "Restart the gateway gracefully"
- "Is the gateway busy right now?"
- "Restart the gateway on the remote machine"

---

## Commands

- `gateway-restart restart` — Wait for active work to finish, then restart
- `gateway-restart status` — Check if anything is actively running (no restart)
- `gateway-restart restart --force` — Skip waiting, restart immediately
- `gateway-restart restart --timeout 300` — Custom wait timeout in seconds
  (default: 300)
- `gateway-restart restart --remote <host>` — Restart a remote fleet machine via SSH

## Detection Strategy

1. **Session age check** — Query `openclaw gateway call status --json` for sessions
   updated in the last 60 seconds
2. **Log confirmation** — If sessions look active, parse today's gateway log for
   unmatched `inbound web message` without a subsequent `auto-reply sent`
3. **Cron job check** — Query `openclaw cron list --json` for currently-running jobs

## Setup

No setup required. Uses `openclaw` CLI commands available on any OpenClaw installation.

