← 返回
未分类

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 t...
中断正在运行的智能体任务,并将其会话回滚至触发上一条用户消息前的状态。适用于智能体卡顿、执行错误任务等情况。
dorianyoung7702 dorianyoung7702 来源
未分类 clawhub v0.1.0 1 版本 99835.3 Key: 无需
★ 1
Stars
📥 586
下载
💾 1
安装
1
版本
#latest

概述

agent-interrupt

> One command. Agent stops. Memory rolled back. Like it never happened.

When an agent goes off-track — running the wrong task, stuck in a loop, or executing something you didn't intend — agent-interrupt kills it cleanly and rewinds its memory to before it received that task.


Quick Start

After installing, run once to set up all your agents:

python -X utf8 scripts/install.py

Then just tell your assistant:

kill dev1
kill all

What It Does

  1. Kills the process — Finds and terminates the agent's running subprocess (precise PID or workspace path fallback)
  2. Verifies it's dead — Aborts if any process survives; transcript stays untouched
  3. Backs up memory — Saves the removed messages to interrupt-logs/ for recovery
  4. Rolls back transcript — Deletes the last user message (the task trigger) and everything after it
  5. Agent wakes up clean — It enters standby with no memory of the interrupted task

Fuzzy Agent Matching

No need to remember exact agent IDs. It understands names:

kill dev1        → matches zero_dev1
kill pm          → matches zero_pm
kill 开发工程师   ��� matches by Chinese name
kill all         → interrupts every agent except main

Precise Kill (Recommended)

For agents running long scripts, use run.py wrapper so they can be killed precisely:

# Instead of: python your_script.py
python -X utf8 scripts/run.py --agent <your_agent_id> -- python your_script.py

install.py automatically adds this protocol to all your agents' AGENTS.md files.

New agents added later are picked up automatically via a background watcher.


Recovery

Every rollback is backed up:

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

Append the backup lines back to the transcript to restore.


Scripts

ScriptPurpose
-----------------
interrupt.pyKill + rollback (main script)
install.pyOne-time setup for all agents
run.pyWrapper for precise kill support
watch.pyAuto-injects new agents (runs via cron)
mark.pyManual PID registration (advanced)

Platform

Works on Windows, Linux, macOS. No external dependencies beyond Python stdlib.

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-30 18:30 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 838 📥 314,313
ai-agent

self-improving agent

pskoett
捕获经验教训、错误及修正内容,以实现持续改进。适用于以下场景:(1)命令或操作意外失败;(2)用户纠正Claude(如“不,那不对……”“实际上……”);(3)用户请求的功能不存在;(4)外部API或工具出现故障;(5)Claude发现自身
★ 4,108 📥 830,720
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,398 📥 323,039