cancel

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

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

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.

agentmods
npx agentmods add commands/alphabravo-oss/guild/cancel
Clone the repo
git clone --depth 1 https://github.com/alphabravo-oss/guild

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

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. Scan, not verified.
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 $0.00005 $0.00458
Opus 5 $0.00003 $0.00229
Sonnet 5 $0.00001 $0.00092
Haiku 4.5 $0.00001 $0.00046

Measured 2d ago against content hash a28e9de9cb02, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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. 2d 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 (2 stars, last pushed 3d ago), licensed MIT. It adds 5 tokens to every session and 458 once invoked, about $0.0000 per session on Opus 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.