How to Configure Windsurf Redshift Prevent Delete
To set up windsurf redshift prevent delete rules, assign a database role without delete rights. Then, require human review before the coding agent runs any terminal commands or tool calls. Many teams give local AI tools the same warehouse login that engineers use every day. When that role has broad write rights, one bad prompt can wipe out live tables. How windsurf redshift prevent delete works with native roles On June 2, 2026, Cognition renamed Windsurf to Devin Desktop with the same featur
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 windsurf redshift prevent delete rules, assign a database role without delete rights. Then, require human review before the coding agent runs any terminal commands or tool calls. Many teams give local AI tools the same warehouse login that engineers use every day. When that role has broad write rights, one bad prompt can wipe out live tables.
How windsurf redshift prevent delete works with native roles
On June 2, 2026, Cognition renamed Windsurf to Devin Desktop with the same features. The built-in agent, known as Cascade, can run terminal commands on its own with permission. It opens a dedicated shell that loads the local profile, aliases, and stored database keys. The agent also talks to external tools through configured Model Context Protocol servers.
When the agent queries your Amazon Redshift cluster, it uses those local database credentials. The native way to stop row deletion is inside the warehouse role system itself. Database admins create a dedicated role for the agent and grant only select rights. If the agent needs to add test data, admins grant insert rights on specific schemas. They leave out delete, truncate, and drop permissions from that role.
When the agent sends a delete command, the warehouse checks the role permissions first. Amazon Redshift blocks the statement and returns a permission error to the local shell. You can also set the desktop app to ask before running any terminal command. This gives the engineer a chance to read the query before it runs.
How local shell setup shapes agent database permissions
Because the agent loads the user shell profile, it inherits every exported variable and alias. Many developers store warehouse logins in shell files so command line tools work right away. When the agent starts a shell session, it picks up those exact same logins. If the developer uses an admin role for daily work, the agent gets admin power.
Splitting human and agent logins on one laptop takes extra setup and care. The engineer must maintain two sets of keys and keep the default shell locked down. If an engineer switches to a high-privilege role to fix a bug, the risk returns. The next prompt in the editor will use that active session until the engineer logs out.
Redshift Security + End-to-End Encryption: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
What native roles solve and what they leave open
Native warehouse roles are great at enforcing strict rules across an entire database schema. If a role never needs to delete rows, revoking that permission works every time. The database engine blocks the action no matter how the query arrives.
Still, static database roles only check who logs in at the start of a session. They cannot inspect what individual statements do in flight when a user needs mixed permissions. Developers often need to insert, update, and clean up rows in shared staging tables. If you remove delete rights from their role, they cannot finish their daily migration tasks. If you grant delete rights, an agent can run a query without a filter clause.
Local prompt approval in the editor also falls short as a safety check. Reading raw SQL strings inside a small chat pane gets tiring during a long day. Engineers often approve commands out of habit, and warehouse role logs lack prompt context. Also, native roles do not mask sensitive data like emails or phone numbers. A read-only query can still pull raw card numbers or national IDs into the prompt.
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
Can Windsurf run Amazon Redshift queries without asking the user first?
The agent runs terminal commands with user permission and uses local Model Context Protocol tools. If a user approves command execution, the agent can run database scripts from the shell. It uses whatever database logins exist in the loaded shell profile.
Does revoking delete rights also block truncate and drop commands in Redshift?
No, Amazon Redshift treats delete, truncate, and drop as separate database permissions. To stop all data removal, admins must keep all three rights off the agent role. They should also block schema ownership so the role cannot alter table rules.
Why is a read-only database role not always enough for AI coding agents?
A read-only role stops data changes, but it still returns all rows from allowed tables by default. Queries can pull sensitive fields like emails, phone numbers, or card numbers into the editor. You need field masking to rewrite those matched values in query results.
Related guides
In this post