Skip to lesson
Exit
Block a risky command with a hook1 / 3

2 min lesson

When the guard fails open

Repair one command guard that silently proceeds when its script crashes or returns invalid JSON.

Step 1 of 3

The force-push guard crashes, and Cursor lets the matched command continue because the hook still fails open.

Tested guard or false confidence

Interactive diagram. Tab through its regions; each focused region shows its detail in the panel below.

diagram: compare

Pick a row to see what to look for.