Tool Policy + Exec Approvals
Tool Policy + Exec Approvals
This chapter is about control boundaries:
- sandbox: execution isolation
- tool policy: tool surface reduction
- approvals: human decision for risky actions
See:
Tool policy pipeline (treat it as a safety protocol)
A practical 5-step model:
- owner-only pruning (default-safe)
- layered policy pipeline (profile/global/agent/group/sandbox/subagent)
- schema normalization (provider compatibility)
before_tool_callhook (patch/block)- optional abort propagation
Hook points: before/after tool call
before_tool_call: patch params or block risky callsafter_tool_call: audit both success and failure paths; prefer fire-and-forget
Exec approvals: request → wait → resolve → timeout (+ grace window)
Keep the two-phase contract and a short grace window to avoid races between request/resolve/waitDecision.
Code entry points (optional)
src/agents/tool-policy-pipeline.tssrc/infra/exec-approvals.tssrc/gateway/exec-approval-manager.ts