DevelopersTV

Make your agent safe and autonomous

Kent C. Dodds — Sep 15, 2026 — tutorial

Why watch

Explains a critical security vulnerability in AI agents that can draft Gmail emails: since Gmail has no drafts-only OAuth scope, any agent with compose access can also send emails. Kent demonstrates the Two Kody Locks pattern—using a coarse Google token for smoke-testing drafts, then saving a thin drafts-only package locked so it cannot gain send capability without promoted commit, and pinning the Google connection to block ad hoc execute calls. For developers building autonomous agents with Gmail integration who need to implement proper OAuth security.