Dev.to
6/16/2026

Sticky Hands Off the Red Button: Approvals, Events, and Resumable Agents in HazelJS
Short summary
HazelJS treats dangerous agent tools (refunds, deletes) as policy objects by marking them requiresApproval: true. When triggered, the runtime blocks execution and emits TOOL_APPROVAL_REQUESTED events, letting humans or systems approve via a trusted controller—keeping approval logic outside the model where it can't be jailbroken. Agents pause at gates and resume from checkpoints, enabling async approval workflows without losing execution state.
- •HazelJS requiresApproval pattern gates dangerous tools at runtime, not prompt
- •Approval logic lives in trusted infrastructure, resistant to jailbreaks
- •Agents pause/resume from checkpoints, enabling async human-in-the-loop workflows
Generated with AI, which can make mistakes.
Is this a good recommendation for you?



