{"skill":{"slug":"claw-mission-killer","displayName":"Claw Mission Killer","summary":"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...","description":"---\nname: claw-mission-killer\ndescription: 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.\n---\n\n# agent-interrupt\n\n> One command. Agent stops. Memory rolled back. Like it never happened.\n\nWhen 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.\n\n---\n\n## Quick Start\n\nAfter installing, run once to set up all your agents:\n\n```bash\npython -X utf8 scripts/install.py\n```\n\nThen just tell your assistant:\n\n```\nkill dev1\nkill all\n```\n\n---\n\n## What It Does\n\n1. **Kills the process** — Finds and terminates the agent's running subprocess (precise PID or workspace path fallback)\n2. **Verifies it's dead** — Aborts if any process survives; transcript stays untouched\n3. **Backs up memory** — Saves the removed messages to `interrupt-logs/` for recovery\n4. **Rolls back transcript** — Deletes the last user message (the task trigger) and everything after it\n5. **Agent wakes up clean** — It enters standby with no memory of the interrupted task\n\n---\n\n## Fuzzy Agent Matching\n\nNo need to remember exact agent IDs. It understands names:\n\n```\nkill dev1        → matches zero_dev1\nkill pm          → matches zero_pm\nkill 开发工程师   ��� matches by Chinese name\nkill all         → interrupts every agent except main\n```\n\n---\n\n## Precise Kill (Recommended)\n\nFor agents running long scripts, use `run.py` wrapper so they can be killed precisely:\n\n```bash\n# Instead of: python your_script.py\npython -X utf8 scripts/run.py --agent <your_agent_id> -- python your_script.py\n```\n\n`install.py` automatically adds this protocol to all your agents' `AGENTS.md` files.\nNew agents added later are picked up automatically via a background watcher.\n\n---\n\n## Recovery\n\nEvery rollback is backed up:\n```\n~/.openclaw/agents/<id>/interrupt-logs/rollback-YYYYMMDD-HHMMSS.jsonl\n```\nAppend the backup lines back to the transcript to restore.\n\n---\n\n## Scripts\n\n| Script | Purpose |\n|--------|---------|\n| `interrupt.py` | Kill + rollback (main script) |\n| `install.py` | One-time setup for all agents |\n| `run.py` | Wrapper for precise kill support |\n| `watch.py` | Auto-injects new agents (runs via cron) |\n| `mark.py` | Manual PID registration (advanced) |\n\n---\n\n## Platform\n\nWorks on Windows, Linux, macOS. No external dependencies beyond Python stdlib.\n","topics":["Message"],"tags":{"latest":"0.1.0"},"stats":{"comments":1,"downloads":654,"installsAllTime":25,"installsCurrent":0,"stars":1,"versions":2},"createdAt":1773740261512,"updatedAt":1779078393962},"latestVersion":{"version":"0.1.0","createdAt":1773740745598,"changelog":"Initial release — provides agent interrupt and rollback functionality with Python scripts.\n\n- Add scripts to install, interrupt, mark, run, and watch agent processes, enabling kill and rollback of agent sessions.\n- Supports interruption of individual agents by ID/name or all agents at once.\n- Rolls back agent memory to the state before the last user-triggering message; backs up removed transcript for recovery.\n- Includes setup and background watcher for automatic protocol injection into new agents.\n- Multi-platform support (Windows, Linux, macOS); no dependencies beyond Python stdlib.","license":"MIT-0"},"metadata":null,"owner":{"handle":"dorianyoung7702","userId":"s17b7jvbnx4sj38ms3y9mvc9p983gfsr","displayName":"maomao","image":"https://avatars.githubusercontent.com/u/225649428?v=4"},"moderation":{"isSuspicious":false,"isMalwareBlocked":false,"verdict":"clean","reasonCodes":["review.llm_review"],"summary":"Review: review.llm_review","engineVersion":"v2.4.24","updatedAt":1780089934259}}