/synthex:cancel-loop/synthex:cancel-loop
BuildCancel a loop by id, or every running loop with --all. Idempotent.
Invocation
Run from inside Claude Code in any project where Synthex is installed:
/synthex:cancel-loopSome commands accept parameters; see the source-of-truth file linked below for the full parameter list and workflow.
Lifecycle phase
Build. Parallel-executed, peer-reviewed task delivery.
Related agents
- Tech Lead · Full-stack orchestrator. Breaks tasks down, delegates to specialists, rolls up the result.
- Lead Frontend Engineer · Coordinates frontend delivery, enforces UX quality, accessibility, and design-system fidelity.
- Architect · System design, ADRs, plan-review feasibility, technology trade-offs.
- Code Reviewer · Craftsmanship review — correctness, maintainability, reuse, conventions.
- Security Reviewer · Mandatory gate. Secrets, injection, auth, supply chain, OWASP.
- Quality Engineer · Test strategy, gap analysis, behavior-driven test authoring.
- Design System · Token ownership, component governance, compliance audit.
- Technical Writer · API docs, guides, migrations, changelogs verifiable against code.
Source
The command's parameters, workflow, and sub-agent invocations are defined in markdown at bluminal/lumenai/blob/main/plugins/synthex/commands/cancel-loop.md.
Last modified:
What it does, end-to-end
/synthex:cancel-loop/synthex:cancel-loop marks a running loop as cancelled. The cancel is polled at the iteration boundary by the looping command — a loop that's mid-iteration when you cancel it will finish that iteration's work, then exit cleanly on the next boundary check. Worst case: one iteration of latency before the loop stops.
The mutation is atomic: tmp file + mv -f rename, so concurrent reads from
/synthex:list-loops/synthex:list-loops or another session's iteration boundary never see a half-written state.
The command is idempotent. Cancelling an already-cancelled (or completed, or max-iterations-reached, or crashed) loop is a no-op with a single confirmation line — never an error.
Parameters
| Parameter | Description | Default | Required |
|---|---|---|---|
loop_id | Positional. The loop-id slug to cancel. | — | Required unless --all |
--all | Cancel every running loop in the project. Mutually exclusive with loop_id. | off | — |
Examples
Cancel a single loop
/synthex:cancel-loop release-1
# → Cancelled loop "release-1" (was at iteration 12/30).Cancel a loop you've already cancelled (idempotent)
/synthex:cancel-loop release-1
# → Loop "release-1" is already cancelled — nothing to do.Cancel everything running in this project
/synthex:cancel-loop --all
# → Cancelled (3):
# release-1 was at iter 12/30
# review-check-7e1d was at iter 4/10
# write-implementation-plan-4c66 was at iter 6/15If nothing is running:
/synthex:cancel-loop --all
# → No running loops to cancel.Refusal paths
- Neither
loop_idnor--allsupplied. PrintsUsage: /synthex:cancel-loop <loop-id> | --alland exits non-zero. - Both
loop_idand--allsupplied. Mutually exclusive; pick one. loop_iddoesn't match an existing state file. Names the slug and suggests /synthex:list-loops/synthex:list-loops.
If .synthex/loops/ doesn't exist at all (no loop has ever run in this project), the
command prints No loops in this project. and exits 0 — not a refusal.
Cancellation timing
--loop-bearing commands check the state file's status at every iteration boundary, in
the same script call that advances the counter (see
the iteration loop spec).
The cancel takes effect on that next read. A loop sitting in an idle wait notices the cancel
too and stops waiting. Cancellation never interrupts an iteration that
is currently executing — the worst-case latency is one iteration's worth of work before the
loop exits.
/synthex:cancel-loop/synthex:cancel-loop only changes the loop's status. Whatever the current iteration was doing finishes and cleans up the way it normally would.
What it does not do
- Delete the state file. Terminal-status state files are archived later by any loop
command that touches
.synthex/loops/. The cancel leaves the file in place so you can read the iteration history (started_at,iteration,exit_reason) until then. - Touch loops in
.archive/. Archived loops are historical and immutable. - Prompt the user. No
AskUserQuestion— single deterministic mutation + confirmation line.
See also
- Native looping — the full framework explainer.
- /synthex:loop/synthex:loop — start or resume a loop.
- /synthex:list-loops/synthex:list-loops — enumerate loops in the project.