-
Notifications
You must be signed in to change notification settings - Fork 0
Tools Safety and Confirmations
YarCraSy edited this page Jul 8, 2026
·
2 revisions
toolExecutionModes can configure each tool:
-
disabled: do not execute. -
enabled: execute with normal rules. -
auto_approve: allow without confirmation if danger analysis does not require it.
Logic lives in src/core/tools/definitions/DangerAnalysis.ts.
It should mark as dangerous:
- deletions or overwrites.
- destructive commands.
- dangerous shell redirection.
- changes outside the workspace.
- secret usage.
- ambiguous high-impact operations.
When there is risk:
- backend sends
toolCallConfirmationRequired. - UI shows tool, arguments, and reason.
- user approves or cancels.
- backend executes only if approval matches the pending tool.
Do not auto-approve a destructive operation just because the tool is set to auto_approve.