| description | Cancel active RLCR loop | |||
|---|---|---|---|---|
| allowed-tools |
|
|||
| disable-model-invocation | true |
To cancel the active loop:
- Run the cancel script:
"${CLAUDE_PLUGIN_ROOT}/scripts/cancel-rlcr-loop.sh"-
Check the first line of output:
- NO_LOOP or NO_ACTIVE_LOOP: Say "No active RLCR loop found."
- CANCELLED: Report the cancellation message from the output
- CANCELLED_METHODOLOGY_ANALYSIS: Report the cancellation message from the output
- CANCELLED_FINALIZE: Report the cancellation message from the output
- FINALIZE_NEEDS_CONFIRM: The loop is in Finalize Phase. Continue to step 3
-
If FINALIZE_NEEDS_CONFIRM:
- Use AskUserQuestion to confirm cancellation with these options:
- Question: "The loop is currently in Finalize Phase. After this phase completes, the loop will end without returning to Codex review. Are you sure you want to cancel now?"
- Header: "Cancel?"
- Options:
- Label: "Yes, cancel now", Description: "Cancel the loop immediately, finalize-state.md will be renamed to cancel-state.md"
- Label: "No, let it finish", Description: "Continue with the Finalize Phase, the loop will complete normally"
- If user chooses "Yes, cancel now":
- Run:
"${CLAUDE_PLUGIN_ROOT}/scripts/cancel-rlcr-loop.sh" --force - Report the cancellation message from the output
- Run:
- If user chooses "No, let it finish":
- Report: "Understood. The Finalize Phase will continue. Once complete, the loop will end normally."
- Use AskUserQuestion to confirm cancellation with these options:
Key principle: The script handles all cancellation logic. A loop is active if state.md (normal loop), methodology-analysis-state.md (Methodology Analysis Phase), or finalize-state.md (Finalize Phase) exists in the newest loop directory.
The loop directory with summaries, review results, and state information will be preserved for reference.