Dev.to
7/6/2026

Human-in-the-Loop AI: Why 'Ask the LLM to Confirm' Isn't Enough
Short summary
Prompt-based AI safety gates can be jailbroken through manipulation; code-based gates enforced via deterministic checks cannot. Genkit offers two patterns: respond interrupts for low-stakes confirmations with flexible UX, and restart tools with code-enforced gates and client-set metadata for security-critical operations. Choose based on operation criticality.
- •Prompt-based approval gates live in system instructions and can be bypassed by prompt injection or user persuasion
- •Code-based approval gates use deterministic logic and client-set metadata that LLMs cannot forge or override
- •Use respond interrupts for clarifications and low-stakes decisions; use restart tools for security-critical or money-related operations
Generated with AI, which can make mistakes.
Is this a good recommendation for you?


