Token导航 LogoToken导航TokenDH.com
开发敏感数据clawhub未标认证来源可访问clear审计提醒

resume-after-gateway-restart网关重启后恢复

Agent Skill

resume-after-gateway-restart 用于补充开发相关能力,适合在 OpenClaw 中需要让 Agent 承接开发相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

2,566

周安装

108

GitHub Stars

公开资料未说明

下载量

899
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:resume-after-gateway-restart(网关重启后恢复)
来源仓库:https://github.com/bobbylindsey/resume-after-gateway-restart
安装命令:
openclaw skills install resume-after-gateway-restart
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install resume-after-gateway-restart

简介

resume-after-gateway-restart 在 OpenClaw gateway 重启后可靠恢复代理任务状态。

  • 适用于 OpenClaw 平台,利用持久化 cron 作业跟踪任务进度。
  • 确保重启不影响多轮对话连续性。
  • 使用前需确认 cron 服务可用性及磁盘空间充足。
  • 建议在非关键时段重启,并观察首次恢复是否正常。

SKILL.md

name
gateway-resume
description
Reliably resume work after openclaw gateway restart (or when you must restart the OpenClaw gateway mid-task). Uses durable one-shot cron agentTurn jobs (isolated session + explicit delivery) so the agent comes back after restart and replies to the same chat (Discord/Telegram/etc), usually with the same model/thinking as the requesting session. Use when: user asks for a gateway restart; you need to restart to apply config/updates; or you must ensure a post-restart follow-up message happens automatically.

Gateway Resume

Gateway restarts kill the current agent process. If you need to restart mid-task, you must create a durable wakeup *before* restarting.

This skill uses cron + isolated agentTurn + explicit delivery route (not systemEvent) so it:

  • survives restarts (cron is persisted to disk)
  • replies back to the same place (Discord channel, Telegram DM/topic, etc)
  • can pin the cron run to the same model/thinking that was active in the requesting session

Procedure (recommended)

0) Tell the user you’re about to go down (own message)

Send a short message in the current chat before you schedule the restart:

  • "Heads up — restarting the gateway for ~10–20s. I’ll be back momentarily and will resume automatically."

Keep this as its own message (don’t bundle it with other info).

Common failure mode: writing a plan but forgetting to actually schedule the cron + restart. If you don’t run Steps 3–4, the gateway won’t go down and you won’t come back.

Do not require a user 'go' message. Instead, schedule the restart to occur ~15s in the future (see Step 4) so this message has time to deliver before the gateway is killed.

1) Save resume context

Write memory/post-restart-task.md:

# Post-restart: <brief description>
- Channel: <where to reply>
- Was doing: <what was in progress>
- Next step: <what to do next on resume>
- Status: pending

2) Resolve the return route + session model (Option B)

From the current chat/session, capture:

  • sessionKey (e.g. agent:main:discord:channel:<id> or agent:main:telegram:direct:<id>)
  • deliveryChannel (e.g. discord, telegram)
  • deliveryTo:

- Discord channel: channel:<channelId> - Discord DM: user:<userId> - Telegram DM/topic: use the chat id or -100…:topic:<id>

  • modelProvider + model for the session (e.g. openai-codex + gpt-5.2)
  • thinkingLevel for the session

Tip: openclaw sessions --active 240 --json includes these fields.

3) Schedule two one-shot cron jobs (back message + resume)

Use the bundled script (Option B: it infers route + model from the session store):

skills/gateway-resume/scripts/schedule-resume-cron.sh \
  --back-delay 75s \
  --delay 90s \
  --session-key "<sessionKey>"

The script will:

  • infer the delivery route from the session key (Discord channel/DM, Telegram DM/group)
  • read openclaw sessions --json to infer modelProvider/model and thinking level
  • schedule two isolated agentTurn cron jobs with explicit delivery:

1) a short, personable "I’m back" message (own message) 2) a resume job that reads memory/post-restart-task.md and completes the next step

Notes:

  • Use --delay 90s (or more) so the job fires well after the gateway finishes restarting.
  • The cron job runs isolated, but delivers back to the captured route.
  • The “back” job is a *separate* message to make the restart feel responsive, even if the resume step takes longer.

4) Restart (delayed)

Do not restart immediately (it can kill the process before the pre-restart message delivers). Instead schedule a restart a few seconds in the future using systemd-run:

skills/gateway-resume/scripts/delayed-gateway-restart.sh 15

This schedules a systemctl --user restart openclaw-gateway.service in a transient user unit.

5) On the cron wake

The scheduled jobs should:

1) Send a short, personable "I’m back" message (by itself). 2) Then resume: - read memory/post-restart-task.md - do Next step - append a handled marker (avoid needing deletes) - reply back to the captured destination with the result

Do not include raw markers like BACK_FROM_RESTART in user-facing text.

Troubleshooting

  • Nothing happens after restart: confirm the cron jobs exist *before* restarting:

- openclaw cron list

  • Cron fires but no message is delivered: route inference may be wrong for this sessionKey pattern.

- Re-run the schedule script with the correct --session-key.

  • Model inference fails: the session may have fallen outside the --active window.

- Edit schedule-resume-cron.sh to use a larger --active range or no filter.

Why not systemEvent?

systemEvent targets the main session, which may be a different model/provider and may fail (or respond in the wrong place). Isolated agentTurn + explicit delivery is deterministic.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

89.37%
按下载量换算803

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills