How to Configure Windsurf Snowflake Prevent Delete

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up a windsurf snowflake prevent delete rule, assign a read-only database role. You must withhold row deletion permissions from the credentials your AI agent uses. Most data teams start by sharing their own local warehouse profiles with their IDE. When an agent inherits a broad developer role, one bad prompt can wipe tables. How windsurf snowflake prevent delete roles work On June 2, 2026, Cognition renamed Windsurf to Devin Desktop. The app keeps the same IDE features and runs the Casc

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

To set up a windsurf snowflake prevent delete rule, assign a read-only database role. You must withhold row deletion permissions from the credentials your AI agent uses. Most data teams start by sharing their own local warehouse profiles with their IDE. When an agent inherits a broad developer role, one bad prompt can wipe tables.

How windsurf snowflake prevent delete roles work

On June 2, 2026, Cognition renamed Windsurf to Devin Desktop. The app keeps the same IDE features and runs the Cascade agent. This agent can run terminal commands on its own with user permission. It opens a dedicated shell that loads your local aliases and variables. The agent also uses Model Context Protocol servers to query external data systems.

When the agent queries your cloud warehouse, it uses the login details on your machine. If those details belong to a full admin role, the agent can drop data. To set up a windsurf snowflake prevent delete workflow, you must change those permissions. You create a restricted role inside the data platform for the agent session. You grant this role permission to read tables and views in specific schemas.

You can also allow the role to insert new rows into staging tables. Still, you do not grant the delete or truncate permissions to this role. Next, you create a dedicated user profile for the IDE on your computer. You assign the restricted role as the default for that user profile. When the agent runs a query through its shell, the database checks the role. If the agent tries to remove rows, the database blocks the statement right away.

What native roles solve and what they miss

Database roles are great for stopping broad actions across an entire warehouse table. They decide who can log in and which high-level commands a session can run. If a user or agent never needs to delete data, a read-only role works. It stops accidental table drops and bulk row removals at the database level.

Still, static roles create friction when developers need to do real work. An engineer often needs to clean up bad test rows during a coding session. If the local profile is locked down, the engineer must switch roles by hand. Teams get tired of switching profiles and end up granting broad permissions again. Also, a role applies to the whole table, not to specific statements in flight.

Snowflake Access Control + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

A native role cannot tell the difference between a safe delete and a bad one. For example, deleting one test row with a filter is fine during development. Deleting a million production rows without a filter is a disaster. Native database permissions cannot inspect the query text to require human approval for big deletes. They also do not mask sensitive data like emails or card numbers in query results. When an agent reads a table, the database returns the raw fields to the IDE. While dynamic masking rewrites matched fields in results, tying it to local roles is hard.

How to manage local agent sessions safely

To keep data safe, you need to separate human credentials from agent tools. Start by checking the shell profiles on your developer machines. Make sure your shell config does not export admin database keys by default. Give every developer a restricted profile for their daily AI coding tasks.

Next, audit the Model Context Protocol servers configured in your desktop app. Check which database role each server uses when it starts a new session. Keep write permissions limited to scratch schemas where data loss does not matter. For production schemas, rely on strict controls that check every statement before it runs.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Does Devin Desktop use the same database setup as Windsurf?

Yes, Windsurf became Devin Desktop in June 2026 and keeps the same IDE features. Its agent still uses your local shell variables and MCP servers to run queries.

Can terminal prompts alone stop an AI agent from deleting rows?

User permission prompts in the IDE let you review terminal commands before they run. Still, humans often click approve too fast, so database-level delete blocks are much safer.

How do we protect sensitive fields when the agent reads tables?

You can apply data masking rules that rewrite emails, phone numbers, and national IDs. This ensures the query results show masked text instead of raw values.

The query runs. The emails stay hidden.