/stop
Stop a running agent
> /plugin marketplace add ruvnet/claude-flowHow 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
/stop
Context preview
What this command does when you run it.
Stop a running agent
Command definition
stop.mdname: stop
description: Stop a running agent
aliases: [kill]
type: command
Agent Stop Command
Stop a running agent with graceful or forced shutdown options.
Usage
npx claude-flow agent stop <agent-id> [options]
npx claude-flow agent kill <agent-id> [options] # Alias
Options
| Option | Short | Description | Default | |--------|-------|-------------|---------| | `--force` | `-f` | Force stop without graceful shutdown | false | | `--timeout` | | Graceful shutdown timeout in seconds | 30 |
Examples
# Graceful stop (completes current task)
npx claude-flow agent stop coder-lx7m9k2
# Force stop (immediate termination)
npx claude-flow agent stop coder-lx7m9k2 --force
# Custom shutdown timeout
npx claude-flow agent stop coder-lx7m9k2 --timeout 60
# Using kill alias
npx claude-flow agent kill researcher-abc123 -f
Graceful vs Force Stop
Graceful Shutdown (Default)
1. Completes current task 2. Saves agent state to memory 3. Releases resources cleanly 4. Notifies swarm coordinator
npx claude-flow agent stop coder-lx7m9k2
# Output:
# Stopping agent coder-lx7m9k2...
# Completing current task...
# Saving state...
# Releasing resources...
# Agent coder-lx7m9k2 stopped successfully
Force Stop
1. Immediate termination 2. No state preservation 3. May leave tasks incomplete
npx claude-flow agent stop coder-lx7m9k2 --force
# Output:
# Stopping agent coder-lx7m9k2...
# Agent coder-lx7m9k2 stopped successfully
Interactive Confirmation
Without `--force`, you'll be prompted to confirm:
? Are you sure you want to stop agent coder-lx7m9k2? (y/N)
Batch Operations
To stop multiple agents:
# Stop all agents of a type
npx claude-flow agent list -t coder --format json | \
jq -r '.agents[].id' | \
xargs -I {} npx claude-flow agent stop {} -f
# Stop all idle agents
npx claude-flow agent list -s idle --format json | \
jq -r '.agents[].id' | \
xargs -I {} npx claude-flow agent stop {}Related Commands
- `npx claude-flow agent list` - Find agent IDs
- `npx claude-flow agent status` - Check status before stopping
- `npx claude-flow swarm destroy` - Stop all agents in swarm
Read more
name: stop description: Stop a running agent aliases: [kill] type: command
Agent Stop Command
Stop a running agent with graceful or forced shutdown options.
Usage
npx claude-flow agent stop <agent-id> [options] npx claude-flow agent kill <agent-id> [options] # Alias
Options
| Option | Short | Description | Default | |--------|-------|-------------|---------| | `--force` | `-f` | Force stop without graceful shutdown | false | | `--timeout` | | Graceful shutdown timeout in seconds | 30 |
Examples
# Graceful stop (completes current task) npx claude-flow agent stop coder-lx7m9k2 # Force stop (immediate termination) npx claude-flow agent stop coder-lx7m9k2 --force # Custom shutdown timeout npx claude-flow agent stop coder-lx7m9k2 --timeout 60 # Using kill alias npx claude-flow agent kill researcher-abc123 -f
Graceful vs Force Stop
Graceful Shutdown (Default)
1. Completes current task 2. Saves agent state to memory 3. Releases resources cleanly 4. Notifies swarm coordinator
npx claude-flow agent stop coder-lx7m9k2 # Output: # Stopping agent coder-lx7m9k2... # Completing current task... # Saving state... # Releasing resources... # Agent coder-lx7m9k2 stopped successfully
Force Stop
1. Immediate termination 2. No state preservation 3. May leave tasks incomplete
npx claude-flow agent stop coder-lx7m9k2 --force # Output: # Stopping agent coder-lx7m9k2... # Agent coder-lx7m9k2 stopped successfully
Interactive Confirmation
Without `--force`, you'll be prompted to confirm:
? Are you sure you want to stop agent coder-lx7m9k2? (y/N)
Batch Operations
To stop multiple agents:
# Stop all agents of a type
npx claude-flow agent list -t coder --format json | \
jq -r '.agents[].id' | \
xargs -I {} npx claude-flow agent stop {} -f
# Stop all idle agents
npx claude-flow agent list -s idle --format json | \
jq -r '.agents[].id' | \
xargs -I {} npx claude-flow agent stop {}Related Commands
- `npx claude-flow agent list` - Find agent IDs
- `npx claude-flow agent status` - Check status before stopping
- `npx claude-flow swarm destroy` - Stop all agents in swarm
An agent meta-harness for Claude Code and Codex. Agent = Model + Harness. The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work.
Repo: ruvnet/claude-flow
Other commands on claude-flow.
- /agent-capabilities
Matrix of agent capabilities and their specializations.
Open command - /agent-coordination
Coordination patterns for multi-agent collaboration.
Open command - /agent-spawning
Guide to spawning agents with Claude Code's Task tool.
Open command - /agent-types
Complete guide to all 54 available agent types in Claude Flow.
Open command - /COMMAND_COMPLIANCE_REPORT
Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools (preferred) - `npx claude-flow` commands (as fallback) - No direct implementation calls
Open command - /bottleneck-detect
Analyze performance bottlenecks in swarm operations and suggest optimizations.
Open command

