Approbation humaine (human-in-the-loop)
Tool : A precise action the AI can call · requires frameworks
Pauses the agent and requests confirmation before a sensitive action.
The only safeguard that reliably works: put it on everything that writes.
Security reflects where data goes, requested permissions and incidents on record at the verification date. It is not a guarantee of zero risk: check the deployment mode and the connections you enable.
What it does, concretely
When an AI agent operates autonomously, certain sensitive actions, such as modifying files, deleting data, or calling external services, can produce irreversible effects. Human-in-the-loop approval solves this by pausing the agent before it acts and requesting explicit confirmation.
In practice, the SDK evaluates each tool call through a chain of checks: hooks, deny rules, ask rules, permission mode, allow rules, and finally the canUseTool callback. If no earlier step resolves the call, the canUseTool callback is invoked, and that is where you can require human validation. You can also configure declarative rules in .claude/settings.json to define what is allowed, denied, or subject to confirmation.
This mechanism is intended for developers building agents with the Claude SDK who want to retain control over risky actions, particularly file writes, deletions, or calls to external tools. It is especially useful in production environments where an automated mistake can have real consequences.
It is not suited to non-technical users looking for a ready-to-use solution without code: its configuration requires working with SDK options, callbacks, and potentially settings files.
What it offers
- ·canUseTool callback: entry point to request human confirmation on any tool call not resolved by earlier steps.
- ·Allow and deny rules: define via allowedTools and disallowedTools which tools are auto-approved or blocked.
- ·Declarative rules in .claude/settings.json: configure allow, deny, and ask permissions without changing code each time.
- ·PreToolUse hooks: run custom code before every tool call to allow, deny, or modify the request, including in bypassPermissions mode.
- ·Permission modes: choose from default, dontAsk, acceptEdits, bypassPermissions, plan, or auto to adapt the level of control to each situation.
- ·Mid-session mode switching: move from a restrictive mode to a more permissive one dynamically, without restarting the agent.
- ·Critical path protection: deletions targeting critical paths are never auto-approved, regardless of the active mode.
In practice
- Price
- Free
- Commercial use
- Commercial use: yes
- Available on
- sdk, claude-code, codex
- Host
- frameworks
- FR interface
- No
Security and data
- Rating
- Security: nothing to flag
- Capabilities
- readswritesexecutesnetwork
- Your data
- Data stays local
- Maintenance
- Active
Links and repository checked on 25 October 2026 · added on 1 January 2024
How to install Approbation humaine (human-in-the-loop)
hooks ou permissions ask