cancel
Cancel any active PEP mode (autopilot, ralph, ultrawork, ecomode, ultraqa, swarm, ultrapilot, pipeline, team)
Skill by leejaedus
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/leejaedus-cancel
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: data
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/cancel
What's inside
- Skill name
cancel- Description
- Cancel any active PEP mode (autopilot, ralph, ultrawork, ecomode, ultraqa, swarm, ultrapilot, pipeline, team)
- License
- MIT
- Instructions
- 384 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Cancel Skill
Intelligent cancellation that detects and cancels the active PEP mode.
**The cancel skill is the standard way to complete and exit any PEP mode.**
When the stop hook detects work is complete, it instructs the LLM to invoke
this skill for proper state cleanup. If cancel fails or is interrupted,
retry with `--force` flag, or wait for the 2-hour staleness timeout as
a last resort.
## What It Does
Automatically detects which mode is active and cancels it:
- **Autopilot**: Stops workflow, preserves progress for resume
- **Ralph**: Stops persistence loop, clears linked ultrawork if applicable
- **Ultrawork**: Stops parallel execution (standalone or linked)
- **Ecomode**: Stops token-efficient parallel execution (standalone or linked to ralph)
- **UltraQA**: Stops QA cycling workflow
- **Swarm**: Stops coordinated agent swarm, releases claimed tasks
- **Ultrapilot**: Stops parallel autopilot workers
- **Pipeline**: Stops sequential agent pipeline
- **Team**: Sends shutdown_request to all teammates, waits for responses, calls TeamDelete, clears linked ralph if present
- **Team+Ralph (linked)**: Cancels team first (graceful shutdown), then clears ralph state. Cancelling ralph when linked also cancels team first.
## Usage
```
/pepcode:cancel
```
Or say: "cancelomc", "stopomc"
## Auto-Detection
`/pepcode:cancel` follows the session-aware state contract:
- By default the command inspects the current session via `state_list_active` and `state_get_status`, navigating `.pep/state/sessions/{sessionId}/…` to discover which mode is active.
- When a session id is provided or already known, that session-scoped path is authoritative. Legacy files in `.pep/state/*.json` are consulted only as a compatibility fallback if the session id is missing or empty.
- Swarm is a shared SQLite/marker mode (`.pep/state/swarm.db` / `.pep/state/swarm-active.marker`) and is not session-scoped.
- The default cleanup flow calls `state_clear` with the session id to remove only the matching session files; modes stay bound to their originating session.
Active modes are still cancelled in dependency order:
1. Autopilot (includes linked ralph/ultraqa/ecomode cleanup)
2. Ralph (cleans its linked ultrawork or ecomode)
3. Ultrawork (standalone)
4. Ecomode (standalone)
5. UltraQA (standalone)
6. Swarm (standalone)
7. Ultrapilot (standalone)
8. Pipeline (standalone)
9. Team (Claude Code native)
10. Plan Consensus (standalone)
## Force Clear All
Use `--force` or `--all` when you need to erase every session plus legacy artifacts, e.g., to reset the workspace entirely.
```
/pepcode:cancel --force
```
```
/pepcode:cancel --all
```
Steps under the hood:
1. `state_list_active` enumerates `.pep/state/sessions/{sessionId}/…` to find every known session.
2. `state_clear` runs once per session to drop that session’s files.
3. A global `state_clear` without `session_id` removes legacy files under `.pep/state/*.json`, `.pep/state/swarm*.db`, and compatibility artifacts (see list).
4. Team artifacts (`~/.claude/teams/*/`, `~/.claude/tasks/*/`, `.pep/state/team-state.json`) are best-effort cleared as part of the legacy fallback.
Every `state_clear` command honors the `session_id` argument, so even force mode still uses the session-aware paths first before deleting legacy files.
Legacy compatibility list (removed only under `--force`/`--all`):
- `.pep/state/autopilot-state.json`
- `.pep/state/ralph-state.json`
- `.pep/state/ralph-plan-state.json`
- `.pep/state/ralph-verification.json`
- `.pep/state/ultrawork-state.json`
- `.pep/state/ecomode-state.json`
- `.pep/state/ultraqa-state.json`
- `.pep/state/swarm.db`
- `.pep/state/swarm.db-wal`
- `.pep/state/swarm.db-shm`
- `.pep/state/swarm-active.marker`
- `.pep/state/swarm-tasks.db`
- `.pep/state/ultrapilot-state.json`
- `.pep/state/ultrapilot-ownership.json`
- `.pep/state/pipeline-state.json`
- `.pep/state/plan-consensus.json`
- `.pep/state/ralplan-state.json`
- `.pep/state/boulder.json`
- `.pep/state/hud-state.json`
- `.pep/state/subagent-tracking.json`
- `.pep/state/subagent-tracker.lock`
- `.pep/state/rate-limit-daemon.pid`
- `.pep/state/rate-limit-daemon.log`
- `.pep/state/checkpoints/` (directory)
- `.pep/state/sessions/` (empty directory cleanup after clearing sessions)
## Implementation Steps
When you invoke this skill:
### 1. Parse Arguments
```bash
# Check for --force or --all flags
FORCE_MODE=false
if [[ "$*" == *"--force"* ]] || [[ "$*" == *"--all"* ]]; then
FORCE_MODE=true
fi
```
### 2. Detect Active Modes
The skill now relies on the session-aware state contract rather than hard-coded file paths:
1. Call `state_list_active` to enumerate `.pep/state/sessions/{sessionId}/…` and discover every active session.
2. For each session id, call `state_get_status` to learn which mode is running (`autopilot`, `ralph`, `ultrawork`, etc.) and whether dependent modes exist.
3. If a `session_id` was supplied to `/pepcode:cancel`, skip legacy fallback entirely and operate solely within that session path; otherwise, consult legacy files in `.pep/state/*.json` only if the state tools report no active session. Swarm remains a shared SQLite/marker mode outside session scoping.From leejaedus/pepcode, MIT.
More from leejaedus/pepcode
- 0.404score
agent-audit
leejaedus
Analyze agent usage patterns and recommend cleanup of unused agents
SkillDFreshness: DClaude Code +9 - 0.404score
distill
leejaedus
Distill session patterns into CLAUDE.md rules and project documentation
SkillDFreshness: DClaude Code +9 - 0.401score
ecomode
leejaedus
Token-efficient model routing modifier
SkillDFreshness: DClaude Code +9 - 0.401score
doctor
leejaedus
Diagnose and fix pepcode installation issues
SkillDFreshness: DClaude Code +9 - 0.401score
frontend-ui-ux
leejaedus
Designer-developer for UI/UX work
SkillDFreshness: DClaude Code +9 - 0.401score
code-review
leejaedus
Run a comprehensive code review
SkillDFreshness: DClaude Code +9 - 0.401score
analyze
leejaedus
Deep analysis and investigation
SkillDFreshness: DClaude Code +9 - 0.398score
help
leejaedus
Guide on using pepcode plugin
SkillDFreshness: DClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Feb 12, 2026 (8 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/leejaedus/pepcode
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from leejaedus
- 0.404score
distill
leejaedus
Distill session patterns into CLAUDE.md rules and project documentation
SkillDFreshness: DClaude Code +9 - 0.404score
agent-audit
leejaedus
Analyze agent usage patterns and recommend cleanup of unused agents
SkillDFreshness: DClaude Code +9 - 0.401score
code-review
leejaedus
Run a comprehensive code review
SkillDFreshness: DClaude Code +9 - 0.401score
frontend-ui-ux
leejaedus
Designer-developer for UI/UX work
SkillDFreshness: DClaude Code +9 - 0.401score
ecomode
leejaedus
Token-efficient model routing modifier
SkillDFreshness: DClaude Code +9 - 0.401score
analyze
leejaedus
Deep analysis and investigation
SkillDFreshness: DClaude Code +9
Cite this page
cancel skill. Agent Mart. https://agentmart.dev/skills/leejaedus-cancel (last updated 2026-10-24)