From swarm-loop
Cancels active swarm loop instances: lists via Glob, lets user select, shuts down teams with SendMessage/TeamDelete, cleans files via Bash rm, restores settings backup if last instance.
How this skill is triggered — by the user, by Claude, or both
Slash command
/swarm-loop:cancel-swarmThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
Check for active swarm loop instances and cancel the selected one:
Check for active swarm loop instances and cancel the selected one:
Glob: .claude/swarm-loop/*/state.json
If no files are found, report that no swarm loop is running and stop.
Read each state file to extract: session_id, goal, iteration, mode, team_name.
If exactly one instance exists, proceed to cancel it. If multiple instances exist, show a summary table:
| Instance ID | Goal | Iteration | Mode |
|---|---|---|---|
<id> | <goal> | <n> | <mode> |
Then use AskUserQuestion to ask the user which instance to cancel (by ID or number).
Once the target instance is selected, note its directory path: .claude/swarm-loop/<id>/
Read .claude/swarm-loop/<id>/state.json to get the current iteration, team_name, goal, and mode. Then call TaskList to get current task status.
If the state file has a non-null team_name field:
"*")Remove swarm loop files for the selected instance (preserve log.md for reference):
rm .claude/swarm-loop/<id>/state.json
rm -f .claude/swarm-loop/<id>/verify.sh
rm -f .claude/swarm-loop/<id>/next-iteration
rm -f .claude/swarm-loop/<id>/heartbeat.json
rm -f .claude/swarm-loop/<id>/deepplan.*
ls .claude/swarm-loop/*/state.json 2>/dev/null
.claude/settings.local.json.swarm-backup exists, restore it:
move .claude/settings.local.json.swarm-backup to .claude/settings.local.jsonsettings.local.json:
permissions.allow"_swarm": true from each event key — preserve any user-defined hooks.hooks is empty, remove it entirelyjq '.permissions.allow = ([.permissions.allow[]? | select(test("swarm-loop|deepplan") | not)] | unique) | if .hooks then .hooks |= with_entries(.value = [.value[]? | select(._swarm != true)] | select(.value | length > 0)) | if (.hooks | length) == 0 then del(.hooks) else . end else . end' .claude/settings.local.jsonTaskList (how many completed, in-progress, pending).claude/swarm-loop/<id>/log.md is preserved for referenceDo NOT delete the instance log file — it contains valuable history the user may want to review.
Note: If teammates were using worktree isolation, Claude Code normally cleans up worktrees when agents finish. If cancellation kills teammates mid-work, orphaned worktrees may remain at .claude/worktrees/. These can be cleaned up manually with git worktree list and git worktree remove.
npx claudepluginhub und3rf10w/claude-litter --plugin swarm-loopCancels active Claude Code loops by checking/removing .loophaus/state.json or legacy .claude/ralph-loop.local.md files and reporting stopped iteration.
Cancels any active OMC mode (autopilot, ralph, ultrawork, ultraqa, swarm, ultrapilot, pipeline, team) with proper state cleanup. Supports session-scoped cancellation and force-clear for workspace reset.
Stops running swarms (execute or discuss mode) with optional data cleanup via bash scripts. Auto-triggers on 'stop swarm', 'kill all', 'shutdown', etc. Locates swarmesh root, checks status, kills tmux sessions.