返回顶部
c

claw-mission-killer爪杀任务

Interrupt a running agent task and rollback its session to the state before the last triggering user message. Use when an agent is stuck, running the wrong task, or needs to be redirected. Triggers on phrases like "interrupt agent", "stop agent and rollback", "cut agent task", "terminate and reset agent", "kill my_agent", "kill all agents", "终止 agent 任务并回滚", "kill掉", "打断". Supports all configured agents by ID, or all agents at once with --all.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.1.0
安全检测
已通过
170
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

claw-mission-killer

agent-interrupt

一条命令。Agent停止。记忆回滚。仿佛从未发生。

当agent偏离轨道——运行错误任务、陷入循环或执行非预期操作时,agent-interrupt 可将其彻底终止,并将记忆回滚至接收该任务之前的状态。



快速开始

安装后,运行一次即可设置所有agent:

bash
python -X utf8 scripts/install.py

然后只需告知你的助手:

kill dev1
kill all



功能说明

  1. 1. 终止进程 — 查找并结束agent正在运行的子进程(精确PID或工作区路径回退)
  2. 验证终止 — 若仍有进程存活则中止操作;对话记录保持不变
  3. 备份记忆 — 将移除的消息保存至 interrupt-logs/ 目录以便恢复
  4. 回滚对话 — 删除最后一条用户消息(任务触发器)及其后的所有内容
  5. Agent干净唤醒 — 进入待机状态,对中断任务毫无记忆

模糊Agent匹配

无需记住精确的agent ID。支持名称识别:

kill dev1 → 匹配 zero_dev1
kill pm → 匹配 zero_pm
kill 开发工程师 → 匹配中文名称
kill all → 中断除主agent外的所有agent



精确终止(推荐)

对于运行长脚本的agent,使用 run.py 封装器以实现精确终止:

bash

替代:python your_script.py


python -X utf8 scripts/run.py --agent agentid> -- python your_script.py

install.py 会自动将此协议添加至所有agent的 AGENTS.md 文件。
后续新增的agent将通过后台监视器自动捕获。



恢复

每次回滚均有备份:

~/.openclaw/agents//interrupt-logs/rollback-YYYYMMDD-HHMMSS.jsonl

将备份行追加回对话记录即可恢复。



脚本


脚本用途
interrupt.py终止+回滚(主脚本)
install.py
一次性设置所有agent |
| run.py | 精确终止支持封装器 |
| watch.py | 自动注入新agent(通过cron运行) |
| mark.py | 手动PID注册(高级功能) |


平台支持

适用于Windows、Linux、macOS。除Python标准库外无外部依赖。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 claw-mission-killer-1776292323 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 claw-mission-killer-1776292323 技能

通过命令行安装

skillhub install claw-mission-killer-1776292323

下载

⬇ 下载 claw-mission-killer v0.1.0(免费)

文件大小: 12.3 KB | 发布时间: 2026-4-17 14:22

v0.1.0 最新 2026-4-17 14:22
Initial release — provides agent interrupt and rollback functionality with Python scripts.

- Add scripts to install, interrupt, mark, run, and watch agent processes, enabling kill and rollback of agent sessions.
- Supports interruption of individual agents by ID/name or all agents at once.
- Rolls back agent memory to the state before the last user-triggering message; backs up removed transcript for recovery.
- Includes setup and background watcher for automatic protocol injection into new agents.
- Multi-platform support (Windows, Linux, macOS); no dependencies beyond Python stdlib.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部