Stop Autonomous Loop Mode

VerifiedSafe

Immediately disables autonomous loop mode by running a Bash script that updates state files and creates a global stop signal. Helps when you need to halt continuous autonomous execution to regain manual control.

Sby Skills Guide Bot
ProductivityBeginner
6/2/2026
Claude Code
#autonomous-loop#stop-loop#claude-automation#loop-interruption

Recommended for

Automated summary

Immediately stops the autonomous loop mode in Claude Code by writing state files and kill signals.

Strengths

  • Immediate execution via a simple Bash script
  • Multiple redundancy mechanisms (state file, kill switch, global signal)
  • Works at both project and global levels

Limitations

  • Requires the .claude directory to exist
  • May not stop instantly if a loop iteration is already running
  • Depends on the CLAUDE_PROJECT_DIR environment variable
When to use it

When you need to safely halt an ongoing autonomous Claude Code loop.

When not to use it

If you want to pause the loop or preserve its state for later resumption.

Security analysis

Safe
Quality score85/100

The script only modifies specific state files within the project's .claude directory and the user's home .claude directory; it does not download, exfiltrate, or execute arbitrary code, and uses safe commands like echo, touch, jq, rm, and date.

No concerns found

How this analysis is made

Examples

Stop autonomous loop
ru stop
Disable loop mode
stop autonomous mode
End autonomous
disable loop

name: stop description: "Disable autonomous loop mode immediately. TRIGGERS - ru stop, stop autonomous, disable loop, end autonomous mode." allowed-tools: Bash argument-hint: "" model: haiku disable-model-invocation: true

RU: Stop

EXECUTE IMMEDIATELY: Use the Bash tool to run the following script.

/usr/bin/env bash << 'RALPH_UNIVERSAL_STOP'
PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$(pwd)}"

echo "Stopping RU loop..."

# Set state to stopped
STATE_FILE="$PROJECT_DIR/.claude/ru-state.json"
if [[ -d "$PROJECT_DIR/.claude" ]]; then
    echo '{"state": "stopped"}' > "$STATE_FILE"
fi

# Create kill switch for redundancy
touch "$PROJECT_DIR/.claude/STOP_LOOP"

# Update config if exists
CONFIG_FILE="$PROJECT_DIR/.claude/ru-config.json"
if [[ -f "$CONFIG_FILE" ]]; then
    jq '.state = "stopped"' "$CONFIG_FILE" > "$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
fi

# Clean up markers
rm -f "$PROJECT_DIR/.claude/ru-start-timestamp"

# Create global stop signal
echo '{"state": "stopped", "timestamp": "'$(date -u +%Y-%m-%dT%H:%M:%SZ)'"}' > "$HOME/.claude/ru-global-stop.json"

echo ""
echo "RU: STOPPED"
echo "Project: $PROJECT_DIR"
RALPH_UNIVERSAL_STOP

After execution, confirm the loop has been stopped.

Troubleshooting

| Issue | Cause | Solution | | ----------------------- | --------------------- | ------------------------------------ | | Loop continues running | Hook still active | Wait for current iteration to finish | | State file not created | .claude dir missing | Create with mkdir -p .claude | | jq error | Config file malformed | Delete and recreate config file | | Permission denied | File not writable | Check directory permissions | | Global stop not working | Different project dir | Ensure CLAUDE_PROJECT_DIR is correct |

From the file to a first result

The download contains exactly the content displayed on this page. This copy may differ from the latest version in the source repository.

View the source and supporting files

This download contains SKILL.md only. Any scripts, references, templates and dependencies are not included. Get the required files from the source, preserving their directory structure, before continuing.

1. Download the file

Download SKILL.md

From the root of a test project, save the file as .skill-downloads/stop-autonomous-loop-mode-mm8o5293/SKILL.md, or use the command below. This folder is for inspecting the skill before installation.

Command for macOS/Linux or WSL: requires a POSIX shell and curl. On Windows without WSL, use the download button and create the folder manually.

mkdir -p '.skill-downloads/stop-autonomous-loop-mode-mm8o5293' && curl --fail --show-error --location 'https://skills-guides.com/api/skills/stop-autonomous-loop-mode-mm8o5293/download' --output '.skill-downloads/stop-autonomous-loop-mode-mm8o5293/SKILL.md.part' && mv '.skill-downloads/stop-autonomous-loop-mode-mm8o5293/SKILL.md.part' '.skill-downloads/stop-autonomous-loop-mode-mm8o5293/SKILL.md'

2. Check prerequisites

Read SKILL.md before using it. If it references scripts or external services, inspect them and prepare the required access in your test environment.

Tools declared by the author (check availability in your agent): Bash

No recognized prerequisites section in this file. This does not mean it is self-contained: libraries, tools and access requirements may be mentioned elsewhere in the content or source repository.

The platforms on this page are catalog indications. The paths below follow tool documentation; they do not prove this skill has been run in those tools. No minimum tool version is confirmed for this listing.

3. Load the skill

After inspection, copy the complete folder into your project using one of the commands below, then open a new tool session. The command stops if a folder with the same name already exists: compare the files before replacing it.

Claude Code
test -f '.skill-downloads/stop-autonomous-loop-mode-mm8o5293/SKILL.md' && test -s '.skill-downloads/stop-autonomous-loop-mode-mm8o5293/SKILL.md' && mkdir -p '.claude/skills' && test ! -e '.claude/skills/stop' && cp -R '.skill-downloads/stop-autonomous-loop-mode-mm8o5293' '.claude/skills/stop'

OpenSkills

OpenSkills must already be installed. The local install/read procedure is checked with OpenSkills 1.5.0, which requires Node.js ≥ 20.6.0. Catalog slugs are not resolved automatically.

Official OpenSkills installation
openskills install './.skill-downloads/stop-autonomous-loop-mode-mm8o5293'

openskills read 'stop-autonomous-loop-mode-mm8o5293'

Reading should display the installed file content and its base directory. It does not run the skill or install its dependencies.

For an agent that reads AGENTS.md, then sync the index. This command changes AGENTS.md: review the diff before using it.

openskills sync

Manual method or another tool: attach SKILL.md to a conversation, or open it in an agent that can read files. Include any required supporting resources. No universal folder is recognized by every tool.

4. Try a first task

Use a short, synthetic input: an API endpoint, a small document or an interface brief. In a new conversation, attach the file or give the agent its path, then adapt this request:

Read .skill-downloads/stop-autonomous-loop-mode-mm8o5293/SKILL.md and apply its instructions to this example: [describe a test input]. Identify any missing files, dependencies or access. Produce the result requested by the skill without inventing data or running unreviewed scripts.

Expected result: output matching the skill instructions, or a precise list of missing prerequisites. A read confirmation alone does not validate a first use. If an external resource is unavailable, that path remains untested.

Related skills