From b38e674c9fa12bc97bd410675dc0e07bd3e9f01a Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Mon, 4 May 2026 17:38:06 -0700 Subject: [PATCH] docs(cli): document gateway restart --safe in command options The `gateway restart` Command-options accordion only listed `--force`, `--wait`, and `--json` even though `--safe` is a fully-supported flag (documented in the prose at line 112 and rejected by lifecycle.ts when combined with --force/--wait). Add --safe to the option list and a Lifecycle-behavior bullet that explains the preflight-defer behavior plus its mutual exclusion with --force and --wait, matching src/cli/daemon-cli/lifecycle.ts:153-156. --- docs/cli/gateway.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/cli/gateway.md b/docs/cli/gateway.md index 7f159238833..b5b3edd8127 100644 --- a/docs/cli/gateway.md +++ b/docs/cli/gateway.md @@ -481,12 +481,13 @@ openclaw gateway restart - `gateway status`: `--url`, `--token`, `--password`, `--timeout`, `--no-probe`, `--require-rpc`, `--deep`, `--json` - `gateway install`: `--port`, `--runtime `, `--token`, `--wrapper `, `--force`, `--json` - - `gateway restart`: `--force`, `--wait `, `--json` + - `gateway restart`: `--safe`, `--force`, `--wait `, `--json` - `gateway uninstall|start|stop`: `--json` - Use `gateway restart` to restart a managed service. Do not chain `gateway stop` and `gateway start` as a restart substitute; on macOS, `gateway stop` intentionally disables the LaunchAgent before stopping it. + - `gateway restart --safe` asks the running Gateway to preflight active OpenClaw work and defer the restart until reply delivery, embedded runs, and task runs drain. `--safe` cannot be combined with `--force` or `--wait`. - `gateway restart --wait 30s` overrides the configured restart drain budget for that restart. Bare numbers are milliseconds; units such as `s`, `m`, and `h` are accepted. `--wait 0` waits indefinitely. - `gateway restart --force` skips the active-work drain and restarts immediately. Use it when an operator has already inspected the listed task blockers and wants the gateway back now. - Lifecycle commands accept `--json` for scripting.