Skip to content

Lesson 5 of 5 · 6 min read

How a Harness Decides What Runs: Permission Rules, Modes and Hooks

A harness turns each proposed tool call into allow, ask or deny. Hooks can rule first; rules are then checked deny before ask before allow, so a broad deny beats a narrow allow; a compound shell command runs only if every part is allowed; the mode supplies the default when no rule matches; and with nobody to ask, ask becomes deny. Hooks also rewrite input, add context, check results and can refuse to let a turn end. Rules and hooks are policy and feedback, not a boundary: the same effect has many spellings.

Premium lessonReviewed By the AIAgentInterviews editorial teamProduct details checked · What changed
Get full Premium access · $25

All 19 topics with every worked answer, all lessons and courses, the full practice bank, and anything new that appears during your access.

6 months · One payment · No auto-renewal

Practise it as an interviewer asks it

From the blog

Related lessons