DEV Community

Sticky Hands Off the Red Button: Approvals, Events, and Resumable Agents in HazelJS (opens in new tab)

Discussed on DEV

Picture a “helpful” agent that can refund any order or delete any database row the moment the model feels confident. Legal signs off on the demo deck; nobody reads the fine print in processRefund until finance asks why last Tuesday’s refunds doubled. HazelJS treats dangerous tools as first-class policy objects: mark them with requiresApproval: true, listen for TOOL_APPROVAL_REQUESTED on the runtime, and call approveToolExecution only from a workflow you trust. The same runtime supports resume...

Read the original article
Sign in to keep reading the full article.

Keyboard Shortcuts

Navigation

Next / previous post
j/k
Open post
oorEnter
Preview post
v

Post Actions

Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Save / unsave
s

Recommendations

Add interest / feed
Enter
Not interested
x

Go to

Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Discover
gb
Search
/

General

Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help