Sport Mode
Temporarily boost heartbeat frequency (default 3m) and inject a monitoring task into HEARTBEAT.md.
Perfect for supervising background agents (Codex), long-running builds, or interactive games.
Usage
CODEBLOCK0
How it works
- 1. ON:
- Patches
~/.openclaw/openclaw.json (hot-reload) to set
heartbeat.every.
- Writes your task to
HEARTBEAT.md with a "Sport Mode Active" header.
- 2. OFF:
- Patches config back to
30m (default).
- Clears
HEARTBEAT.md.
Best Practices
1. Set a Finish Line
Unless you want an endless marathon, always define a
termination condition in your task.
- - ✅ Good: "Monitor build. If success or fail, run sport-mode off."
- ❌ Bad: "Monitor build." (Agent might keep reporting "Done" forever until you manually stop it).
2. State Machine in File
For multi-step tasks (like games or staged deployments), let the agent
update HEARTBEAT.md itself.
- - Pattern: Read state -> Execute step -> Write new state -> Sleep.
- This keeps the agent "stateless" (doesn't rely on conversation history context window) but the task "stateful".
3. Use tmux for Visibility
If the monitoring task involves terminal output (e.g., Codex coding, compiling), running the task in a
tmux session is ideal.
- - The agent can inspect the pane (
tmux capture-pane) without interfering. - The user can attach (
tmux attach) to watch live.
4. Silence is Golden
For high-frequency modes (e.g., 1m), avoid spamming "Nothing happened".
- - Configure the agent to reply
HEARTBEAT_OK (silence) if the status hasn't changed. - Only notify the user on milestone completion, errors, or final success.
Implementation Note
This skill uses
openclaw config set to safely patch configuration at runtime, triggering a seamless Gateway reload.
运动模式
临时提升心跳频率(默认3分钟),并向 HEARTBEAT.md 注入监控任务。
非常适合监督后台代理(Codex)、长时间运行的构建任务或互动游戏。
使用方法
bash
开启:将心跳设为3分钟并设置监控任务
sport-mode on --task 检查 Codex 进度。如果完成,运行 sport-mode off。
自定义间隔:设为1分钟
sport-mode on --task 游戏心跳 --every 1m
关闭:将心跳重置为30分钟并清空 HEARTBEAT.md
sport-mode off
工作原理
- 1. 开启:
- 修改 ~/.openclaw/openclaw.json(热重载)以设置 heartbeat.every。
- 将你的任务写入 HEARTBEAT.md,并添加运动模式已激活标题。
- 2. 关闭:
- 将配置恢复为 30m(默认值)。
- 清空 HEARTBEAT.md。
最佳实践
1. 设定终点线
除非你想进行一场无休止的马拉松,否则务必在任务中定义
终止条件。
- - ✅ 正确:监控构建。如果成功或失败,运行 sport-mode off。
- ❌ 错误:监控构建。(代理可能会一直报告完成,直到你手动停止)。
2. 文件中的状态机
对于多步骤任务(如游戏或分阶段部署),让代理自行
更新 HEARTBEAT.md。
- - 模式:读取状态 -> 执行步骤 -> 写入新状态 -> 休眠。
- 这使代理保持无状态(不依赖对话历史上下文窗口),但任务保持有状态。
3. 使用 tmux 提高可见性
如果监控任务涉及终端输出(例如 Codex 编码、编译),在
tmux 会话中运行任务是最理想的。
- - 代理可以检查窗格(tmux capture-pane)而不干扰。
- 用户可以附加(tmux attach)实时观看。
4. 沉默是金
对于高频模式(例如1分钟),避免重复发送什么都没发生。
- - 配置代理在状态未改变时回复 HEARTBEAT_OK(静默)。
- 仅在里程碑完成、错误或最终成功时通知用户。
实现说明
此技能使用 openclaw config set 在运行时安全地修改配置,触发无缝的网关重载。