Agent skill
cancel
Cancel stuck or orphaned executions
Install this agent skill to your Project
npx add-skill https://github.com/Q00/ouroboros/tree/main/skills/cancel
SKILL.md
/ouroboros:cancel
Cancel stuck or orphaned executions by session ID, cancel all running sessions, or interactively pick from active executions.
Usage
/ouroboros:cancel # Interactive: list active, pick one
/ouroboros:cancel <execution_id> # Cancel specific execution
/ouroboros:cancel --all # Cancel all running executions
Trigger keywords: "cancel execution", "kill session", "stop running", "abort execution"
How It Works
This skill interacts directly with the event store (not via MCP tool) to emit cancellation events. It uses the CLI command under the hood.
Three modes:
- Bare (no args): Lists all active (running/paused) executions in a numbered table and prompts you to pick one to cancel
- Explicit (
execution_id): Cancels the specified execution immediately --allflag: Cancels every running or paused execution at once
Instructions
When the user invokes this skill:
-
Determine which mode to use:
- If the user provided an execution/session ID: Explicit mode
- If the user says "cancel all" or "cancel everything": --all mode
- If no ID given and not "all": Bare mode (interactive listing)
-
Run the appropriate CLI command using Bash:
Bare mode (interactive):
bashouroboros cancel executionThis will list active executions and prompt for selection.
Explicit mode (specific execution):
bashouroboros cancel execution <execution_id>Cancel all mode:
bashouroboros cancel execution --allWith custom reason:
bashouroboros cancel execution <execution_id> --reason "Stuck for 2 hours" -
Present results to the user:
- Show which executions were cancelled
- If bare mode, show the list and selection prompt
- If no active executions, inform the user
-
End with a next-step suggestion:
- After cancellation:
📍 Cancelled — use ooo status to verify, or ooo run to start fresh - No active sessions:
📍 No active executions — use ooo run to start a new one
- After cancellation:
State Transitions
Only sessions in running or paused status can be cancelled. Sessions that are already completed, failed, or cancelled are skipped with a warning.
Fallback (No Database)
If the event store database does not exist:
No Ouroboros database found at ~/.ouroboros/ouroboros.db.
Run an execution first with: /ouroboros:run
Example
User: cancel that stuck execution
> ouroboros cancel execution
Active Executions
┌───┬──────────────────┬──────────────┬─────────┬─────────┬──────────────┐
│ # │ Session ID │ Execution ID │ Seed ID │ Status │ Started │
├───┼──────────────────┼──────────────┼─────────┼─────────┼──────────────┤
│ 1 │ sess-abc-123 │ exec-001 │ seed-42 │ running │ 2024-01-15 │
│ 2 │ sess-def-456 │ exec-002 │ seed-99 │ paused │ 2024-01-14 │
└───┴──────────────────┴──────────────┴─────────┴─────────┴──────────────┘
Enter number to cancel (1-2), or 'q' to quit: 1
Cancel session sess-abc-123 (running)? [y/N]: y
✓ Cancelled execution: sess-abc-123
📍 Cancelled — use `ooo status` to verify, or `ooo run` to start fresh
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
welcome
First-touch experience for new Ouroboros users
ouroboros
When user message starts with 'ooo', call ouroboros_channel_workflow MCP tool. Do NOT answer the request yourself. Do NOT generate code. Do NOT summarize. Just call the tool and relay the response.
update
Check for updates and upgrade Ouroboros to the latest version
publish
Publish Seed specification as GitHub Issues for team-based project management
seed
Generate validated Seed specifications from interview results
help
Full reference guide for Ouroboros commands and agents
Didn't find tool you were looking for?