搜索

PythonReactSEOPDF
OpenClaw

smart-wake

Prevent subagent timeout using checkpoint + cron wake + resume via session spawn mechanism.

cong910 来源安装数☆ 0 仓库 Starsv1.0.0

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install cong91/smart-wake

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

SKILL: smart-wake

Objective

Ensure long-running tasks do not lose progress when subagent timeout occurs.

Standard mechanism:

  1. Auto-save state before timeout / reaching timeout threshold.
  2. Cron wake to re-invoke agent at scheduled time.
  3. Resume task from latest checkpoint using sessions_spawn (or session_spawn depending on runtime) with appropriate wakeMode.

Activation Triggers

Use smart-wake when any of the following conditions are met:

  • Task duration exceeds default subagent timeout.
  • Requires periodic polling (by minute/hour) to continue processing.
  • Multi-step workflow that may pause mid-execution but must resume accurately.
  • Running overnight / off-hours but still needs to auto-continue.

Available Tools (Built-in)

  • sessions_spawn / session_spawn (spawn new work session)
  • Gateway cron jobs (schedule wake events)
  • Memory/slot for state persistence (state checkpoint)

Do not create new tools. Only use existing mechanisms.


State Contract (MANDATORY)

Each task must implement checkpointing with minimum schema:

{
  "task_id": "smartwake_<slug>_<timestamp>",
  "goal": "Final objective",
  "status": "running|waiting|blocked|done|failed",
  "current_step": "step_name",
  "progress_pct": 0,
  "last_completed": ["step_a", "step_b"],
  "next_actions": ["action_1", "action_2"],
  "artifacts": ["path/file1", "path/file2"],
  "errors": [],
  "retry_count": 0,
  "updated_at": "ISO_TIMESTAMP"
}

Requirements:

  • Update checkpoint after each completed step.
  • Final checkpoint before timeout.
  • Resume always reads latest checkpoint; never re-run blindly.

Standard Workflow

Step 1 — Preflight (Estimate Timeout)
  • Determine subagent timeout and total task duration.
  • If estimated_duration > 70% timeout: enable smart-wake immediately.
  • Create task_id and initial checkpoint.
Step 2 — Execute by Small Chunks
  • Divide task into 5–15 minute chunks.
  • After each chunk:
    • Write pr...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/cong91/smart-wake
Version
1.0.0
Commit
1c6db096fc468bf5612c731b025a2c4525633b8d
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# SKILL: smart-wake

## Objective
Ensure long-running tasks do not lose progress when subagent timeout occurs.

Standard mechanism:
1. **Auto-save state** before timeout / reaching timeout threshold.
2. **Cron wake** to re-invoke agent at scheduled time.
3. **Resume task** from latest checkpoint using `sessions_spawn` (or `session_spawn` depending on runtime) with appropriate `wakeMode`.

---

## Activation Triggers
Use `smart-wake` when any of the following conditions are met:
- Task duration exceeds default subagent timeout.
- Requires periodic polling (by minute/hour) to continue processing.
- Multi-step workflow that may pause mid-execution but must resume accurately.
- Running overnight / off-hours but still needs to auto-continue.

---

## Available Tools (Built-in)
- `sessions_spawn` / `session_spawn` (spawn new work session)
- Gateway cron jobs (schedule wake events)
- Memory/slot for state persistence (state checkpoint)

> Do not create new tools. Only use existing mechanisms.

---

## State Contract (MANDATORY)
Each task must implement checkpointing with minimum schema:

```json
{
  "task_id": "smartwake_<slug>_<timestamp>",
  "goal": "Final objective",
  "status": "running|waiting|blocked|done|failed",
  "current_step": "step_name",
  "progress_pct": 0,
  "last_completed": ["step_a", "step_b"],
  "next_actions": ["action_1", "action_2"],
  "artifacts": ["path/file1", "path/file2"],
  "errors": [],
  "retry_count": 0,
  "updated_at": "ISO_TIMESTAMP"
}
```

Requirements:
- Update checkpoint after each completed step.
- Final checkpoint before timeout.
- Resume always reads latest checkpoint; never re-run blindly.

---

## Standard Workflow

### Step 1 — Preflight (Estimate Timeout)
- Determine subagent timeout and total task duration.
- If `estimated_duration > 70% timeout`: enable `smart-wake` immediately.
- Create `task_id` and initial checkpoint.

### Step 2 — Execute by Small Chunks
- Divide task into 5–15 minute chunks.
- After each chunk:
  - Write pr...

相关技能

OpenClaw

1password

daggerkun007

Set up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.