Skip to content
Automation
Command

/cancel

Cancel the active dev workflow loop (archives by default, --hard to wipe)

From plugin
stagent
259 skills1 agent9 commands8 hooks
Install
> /plugin marketplace add jie-worldstatelabs/stagent
> /plugin install stagent@stagent

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/cancel

Context preview

What this command does when you run it.

Cancel the active dev workflow loop (archives by default, --hard to wipe)

Command definition

cancel.md
description: "Cancel the active dev workflow loop (archives by default, --hard to wipe)"
allowed-tools: ["Bash", "TaskStop"]

Cancel the current session's active dev workflow.

**Default behaviour**: archives the run dir to `.stagent/.archive/<YYYYMMDD-HHMMSS>-<topic>-cancelled/` so all stage reports and the baseline survive as an audit trail. The dir name's `-cancelled` suffix distinguishes cancelled runs from natural replacements.

**`--hard`**: skip the archive and `rm -rf` the run dir. Use when you really don't want any artifacts left behind.

**Cloud mode**: POSTs a cancel to the server, then wipes the local shadow dir. The server keeps the audit trail on its side; nothing local is preserved.

Step 1 — Cancel and surface in-flight subagents

bash "${CLAUDE_PLUGIN_ROOT}/scripts/cancel-workflow.sh" $ARGUMENTS

The script archives or wipes the run dir, removes inflight markers, and — if the workflow had a subagent in flight — prints a line of the form:

STAGENT_STOP_AGENT_IDS: <id1> <id2> ...

Step 2 — Stop each in-flight subagent

If Step 1 printed a `STAGENT_STOP_AGENT_IDS:` line, call the `TaskStop` tool **once per id** to terminate the orphan subagents. If it didn't print that line, skip this step — there were no in-flight subagents.

Stopping subagents is what prevents post-cancel writes (rogue commits, mid-flight code) from landing in the project after the workflow has been wiped.

Read more
Ships withstagent

A Claude Code plugin that runs config-driven development workflows as a state machine. You declare stages, transitions, and inputs in a single workflow.json; the plugin's hooks and scripts drive the loop.

Get the whole plugin
Stats
25
Stars
1
Forks
Maintained
Maintenance
Shell
Language
4mo ago
Last commit
5mo ago
Created

Repo: jie-worldstatelabs/stagent

Other commands on stagent.