How to Configure Windsurf Neon Sandbox

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a windsurf neon sandbox by creating an isolated database branch. Then you give the coding agent a scoped role to run queries. Teams often link their editor straight to a test database using admin keys. Broad roles let the agent drop tables or read private user rows. How a windsurf neon sandbox works in practice Cognition renamed Windsurf to Devin Desktop on June 2, 2026. The editor keeps the same features and uses its agent to run tasks. This agent runs terminal commands on its own

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.

You set up a windsurf neon sandbox by creating an isolated database branch. Then you give the coding agent a scoped role to run queries. Teams often link their editor straight to a test database using admin keys. Broad roles let the agent drop tables or read private user rows.

How a windsurf neon sandbox works in practice

Cognition renamed Windsurf to Devin Desktop on June 2, 2026. The editor keeps the same features and uses its agent to run tasks. This agent runs terminal commands on its own when the user gives permission. It opens a dedicated shell on macOS or Linux for these tasks. That shell loads the user shell setup, including local aliases and stored keys. The legacy Cascade agent also reaches external tools through configured Model Context Protocol servers.

To build the windsurf neon sandbox, engineers branch their Postgres database. A branch gives the agent an isolated copy of the schema for testing. You create a specific Postgres role inside that branch with limited rights. Then you place the database link in the local shell setup. When the agent runs a migration or test script, it reads that variable. The agent sends queries from the dedicated terminal straight to the sandbox branch.

What native roles solve and what they leave open

Database branches and native Postgres roles solve basic isolation problems well. They stop an agent from breaking the main database schema during a test. Role limits also block the agent from reading tables it does not need. If the agent ruins a test table, you can reset the branch fast.

Still, native database setup only checks who logs in at the start. It does not check what individual statements do in flight during a session. Once the agent logs in, it holds every right granted to that role. A bad prompt can still tell the agent to delete all test data. Also, branched databases often hold copies of real customer rows from main tables. When the agent queries those tables, raw emails and phone numbers enter the chat. Card numbers and national IDs can also flow back into the model context. Native roles cannot rewrite matched fields in results on the fly. Also, local shell keys sit on the developer laptop in plain text. Any background script in that shell can read and misuse those static keys.

AI Sandbox Environments + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Managing agent queries and sensitive data

Safe agent workflows need controls that act on each query in real time. Teams should separate the login step from the actual approval of risky commands. Even in a sandbox, you want to pause destructive table drops for approval. You also want to mask emails and card numbers in query outputs. Rewriting matched fields in results keeps sensitive data out of external model logs. Finally, keeping raw database keys off local disks stops accidental key leaks.

Check every Postgres query on the wire

Database roles and network rules decide who can open a session. They do not read what each SQL statement does after login. With hoop.dev, you run an open-source proxy, a sidecar for your Postgres, inline in the Postgres wire protocol. 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 apps and agents keep their login details and change only the host and port in the connection string their tool uses.

Before a query runs, hoop.dev guardrails refuse bad deletes or drops with a real Postgres error, or hold risky queries for approval. On the way back, hoop.dev data masking rewrites sensitive values in returned rows in memory, and every verdict goes to the audit trail. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and generates evidence for HIPAA, GDPR, and PCI DSS. See the code on GitHub.

Frequently asked questions

Is Windsurf the same tool as Devin Desktop?

Yes, Cognition renamed Windsurf to Devin Desktop on June 2, 2026. The editor keeps the same core features, terminal runner, and agent setup.

How does the coding agent reach the Neon database?

The agent runs commands in a dedicated shell that loads your user profile. It can also query databases through configured Model Context Protocol servers.

Why is a database branch not enough for data safety?

Branches copy data from parent tables, which often include real emails or card numbers. Without field masking, the agent reads those rows and sends them to the model.

The query runs. The emails stay hidden.