DROP TABLE fails at the database, before it reaches your data. Defense does not depend on the model behaving.
Split the roles
Most data-agent questions are read-only. Writes (building a summary table, recording a correction) are rarer and riskier. Separate them into different agents on different connections.
The Engineer’s writes are scoped to a schema (for example
dash) that the Analyst never touches. Even prompted into DROP TABLE public.users, its engine refuses, because the connection has no write grant on public.
Gate the writes that remain
For writes you do allow, add a human in the loop.requires_confirmation pauses the run until someone approves the action.