Skip to main content
command official · Anthropic

cancel-ralph — Claude Code command: stop an active Ralph Loop

Cancels a running Ralph Loop: checks the state file, reads the iteration number and deletes it. Handy when a loop needs to stop.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin install ralph-loop@claude-plugins-official
Open on GitHub

What cancel-ralph does

Three steps, nothing more. The command runs a Bash check for .claude/ralph-loop.local.md. No file means it reports that no active Ralph loop was found. If the file is there, it reads the iteration: field and removes the file with rm, then tells you which iteration the loop had reached.

Its permissions cover exactly three tools: Bash(test -f .claude/ralph-loop.local.md:*), Bash(rm .claude/ralph-loop.local.md) and Read(.claude/ralph-loop.local.md). So cancelling touches one state file and leaves the rest of the project alone.

You get it with the ralph-loop plugin, there is no separate install. Keep the state file at .claude/ralph-loop.local.md — anywhere else and the command will not see it and will report no active loop.

What it helps with

  • stop a running Ralph Loop
  • find out which iteration a loop stopped at
  • clear the state file after cancelling
  • check whether a loop is active right now

Example prompts for the agent

  • Cancel the Ralph Loop
  • Stop the Ralph loop and tell me the iteration it was on
  • Check for an active Ralph Loop and cancel it

How to install cancel-ralph

1Plugin marketplace

/plugin install ralph-loop@claude-plugins-official

2Manually: put the files in place

.claude/commands/cancel-ralph.md

Call it with /cancel-ralph. For all projects use ~/.claude/commands/

Questions about cancel-ralph

How do I install cancel-ralph in Claude Code?

It ships with the plugin: run /plugin install ralph-loop@claude-plugins-official, then place the file .claude/commands/cancel-ralph.md.

What does cancel-ralph do?

It looks for .claude/ralph-loop.local.md, reads the iteration number from it and deletes the file, reporting where the loop was cancelled.

What happens when no loop is running?

The command checks .claude/ralph-loop.local.md and answers that no active Ralph loop was found.

Source text

cancel-ralph.md · Apache-2.0
---
description: "Cancel active Ralph Loop"
allowed-tools: ["Bash(test -f .claude/ralph-loop.local.md:*)", "Bash(rm .claude/ralph-loop.local.md)", "Read(.claude/ralph-loop.local.md)"]
hide-from-slash-command-tool: "true"
---

# Cancel Ralph

To cancel the Ralph loop:

1. Check if `.claude/ralph-loop.local.md` exists using Bash: `test -f .claude/ralph-loop.local.md && echo "EXISTS" || echo "NOT_FOUND"`

2. **If NOT_FOUND**: Say "No active Ralph loop found."

3. **If EXISTS**:
   - Read `.claude/ralph-loop.local.md` to get the current iteration number from the `iteration:` field
   - Remove the file using Bash: `rm .claude/ralph-loop.local.md`
   - Report: "Cancelled Ralph loop (was at iteration N)" where N is the iteration value

© Anthropic · Apache-2.0 · anthropics/claude-plugins-official

Similar slash commands

All slash commands for Agent setup: memory, context, orchestration →
ralph-plan mastra-ai An interactive planning skill for Claude Code and coding agents. It helps build structured ralph-loop commands through guided dialog and codebase exploration. CX Codex +1 2,600installs setup-development-environment davila7 A slash command that builds out a dev environment: runtimes, tooling, build setup, linters, configs. Handy when you spin up a project on a fresh machine. 651installs Ouroboros Q00 Turns a vague request into a testable spec through interview, crystallize, execute, evaluate. Useful when your agent keeps guessing requirements and redoing the same work. CX Codex +1 ★ 6,279repo stars security-hardening Seth Hobson This command runs a staged security review: vulnerability scanning, threat modeling, and architecture checks. Use it when a project needs a documented hardening pass. CX Codex 437installs status Seth Hobson Shows Conductor project status, active tracks, and next actions. Use it to inspect task progress and spot blockers. CX Codex 348installs create-architecture-documentation davila7 A Claude slash command that turns your repo into architecture documentation: diagrams, ADRs and component descriptions. 6,136installs refactor-code davila7 A slash command that walks Claude through 17 refactoring steps, from analysis and tests to performance checks and review prep. 4,890installs update-docs davila7 A slash command that walks specs/, CLAUDE.md and README.md, marks finished work and refreshes phase completion percentages. 3,861installs

From the same set145

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor