cancel

cancel is a command for Claude Code from alphabravo-oss/guild. It costs 5 tokens per session (458 once invoked), scanned C, original, MIT.

A command for marking an active Crew run as cancelled, where a run is a tracked multi-step agent task. It can leave the run files for inspection or, after confirmation, remove that run's directory.

In plain words
What is it for?
It is for listing active runs, cancelling a selected run, or cancelling and deleting only that run's stored directory.
Why use it?
It stops later commands from treating an unwanted run as active while preserving the option to inspect its saved work.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool.

Part of the crew plugin — 5 commands, 5 agents shipped together

Good fit It is for listing active runs, cancelling a selected run, or cancelling and deleting only that run's stored directory.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alphabravo-oss/guild/cancel
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/alphabravo-oss/guild

Made for: Claude Code.

Or install crew, the plugin that ships this one along with the rest of its 5 commands, 5 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for cancel

README.md
[![agentmods](https://agentmods.dev/badge/commands/alphabravo-oss/guild/cancel/github.svg)](https://agentmods.dev/commands/alphabravo-oss/guild/cancel)
Your own site
<a href="https://agentmods.dev/commands/alphabravo-oss/guild/cancel"><img src="https://agentmods.dev/badge/commands/alphabravo-oss/guild/cancel/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for cancel

Your own site · 80×15
<a href="https://agentmods.dev/commands/alphabravo-oss/guild/cancel"><img src="https://agentmods.dev/badge/commands/alphabravo-oss/guild/cancel.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 5 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 458 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00005 $0.00458
Opus 5.5 $0.00002 $0.00183
Sonnet 5.5 $0.00001 $0.00092
Haiku 4.5 $0.00001 $0.00046

Measured 3mo ago against content hash a28e9de9cb02, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade C, and why

cancel scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

rm -rf ".crew/runs/$RUN_ID"
plugins/crew/commands/cancel.md · 58 lines

What it actually says

Crew Cancel

Mark a crew run as cancelled. Does NOT kill running processes (the orchestrator is per-invocation, not a daemon) — it sets the on-disk status so subsequent runs/lists treat it as cancelled.

RUN_ID="$ARGUMENTS"

If $ARGUMENTS is empty, list active runs (status not in {completed, cancelled*}) and ask which to cancel via AskUserQuestion.

Steps

  1. Verify the run exists at .crew/runs/$RUN_ID/state.json.

  2. Read current status. If already completed or cancelled*, tell the user "nothing to do" and stop.

  3. Confirm with user via AskUserQuestion:

    • Cancel — mark cancelled, leave artifacts for inspection
    • Cancel and delete — mark cancelled, remove the run dir (only the run dir, never anything outside)
    • Never mind — leave alone
  4. On Cancel: update state.json:

{
  ...existing fields...,
  "status": "cancelled",
  "cancelled_at": "<ISO timestamp>",
  "cancelled_at_phase": "<previous phase>"
}
  1. On Cancel and delete: do the state.json update first, then remove the dir:
rm -rf ".crew/runs/$RUN_ID"

(This is the only place in the plugin where the orchestrator itself does a destructive op — and it's gated by an explicit user confirmation.)

  1. Confirm to user:
Cancelled <RUN_ID>. <Artifacts at .crew/runs/<RUN_ID>/ | Artifacts removed.>

Rules

  • Confirm before destructive action. Always.
  • Never touch anything outside .crew/runs/<run-id>/.
  • A cancelled run can be inspected but not resumed (use /crew:do to start fresh).
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 58 lines · 5 tokens per session scan C a28e9de9cb02

Subscribe to this mod's changes

cancel is a command published in the GitHub repository alphabravo-oss/guild (3 stars, last pushed 12d ago), licensed MIT. It adds 5 tokens to every session and 458 once invoked, about $0.0000 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

cancel compared with commands from other repositories

cancel next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cancelalphabravo-oss/guildCommand312d agoMITC5Claude Code
checklistgithub/spec-kitCommand153ktodayMITA13Claude Code
clarifygithub/spec-kitCommand153ktodayMITA27Claude Code
specifygithub/spec-kitCommand153ktodayMITA13Claude Code
analyzegithub/spec-kitCommand153ktodayMITA26Claude Code
convergegithub/spec-kitCommand153ktodayMITA35Claude Code
implementgithub/spec-kitCommand153ktodayMITA14Claude Code