mirror of
https://github.com/Yeachan-Heo/oh-my-claudecode.git
synced 2026-09-03 06:25:33 +08:00
Add isSessionCancelInProgress() function to scripts/persistent-mode.cjs and templates/hooks/persistent-mode.mjs to check for cancel-signal-state.json before blocking session stops. This fixes issue #1299 where /oh-my-claudecode:cancel was not working because the stop hook continued blocking even after the cancel command was issued. The fix: - Checks session-scoped cancel signal first (.omc/state/sessions/{id}/cancel-signal-state.json) - Falls back to legacy path (.omc/state/cancel-signal-state.json) - Validates 30-second TTL on the signal - Allows stop immediately if cancel is in progress This affects all persistent modes (ralph, autopilot, ultrawork, etc.) since they all rely on the same persistent-mode hook. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>