How to Configure Goose Neon Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up goose neon approval, combine local agent prompts with strict Postgres roles. This ensures a human reviews every database task before the AI agent runs it. Many teams start by giving the Goose AI agent a main database key. That shortcut lets the agent read, write, and drop tables without a human check. Overly broad roles turn a small prompt mistake into a fast production outage. How goose neon approval works in practice Goose is a local developer agent that runs shell tools and datab

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 goose neon approval, combine local agent prompts with strict Postgres roles. This ensures a human reviews every database task before the AI agent runs it. Many teams start by giving the Goose AI agent a main database key. That shortcut lets the agent read, write, and drop tables without a human check. Overly broad roles turn a small prompt mistake into a fast production outage.

How goose neon approval works in practice

Goose is a local developer agent that runs shell tools and database tasks. Neon is a cloud Postgres service that lets teams create fast database branches. Neither tool offers a joint review button out of the box. Instead, teams build this workflow by linking local agent rules with database roles.

First, you set the local Goose agent to ask for permission before running tasks. When the agent plans a query, it pauses and shows the text to you. You read the planned command on your screen and say yes or no. This local check acts as your first line of defense against bad queries.

Second, you pair that local prompt with isolated database branches in Neon. Instead of pointing the agent at main data, you create a fresh branch. You give the agent a role that only works on that child branch. If the agent writes a bad migration, your main data stays safe.

Setting up database roles and branch rules

Good database security starts by splitting read and write roles in Postgres. You should create a read-only role for daily agent questions and schema checks. The agent uses this safe role to inspect tables and draft SQL queries. Because the role cannot change data, the agent can explore without risk.

When the agent needs to change a table, it switches to a branch role. A human engineer reviews the proposed change inside the local agent prompt first. Once approved, the agent applies the update to the isolated Neon branch. Teams then test the branch and merge changes through their normal code review.

You should also limit how long database keys stay valid for local agents. Static keys stored in local text files are easy to leak or misuse. Rotating database keys often keeps old agent sessions from running surprise tasks later.

Approval Chains & Escalation + End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What native checks solve and what they miss

Native roles and local prompts solve the basic problem of accidental agent writes. Database branches keep test changes away from live user tables during development. Read-only roles stop the agent from deleting rows when it only needs answers. Local agent prompts give the developer a chance to stop bad shell commands.

Still, this native setup only checks who logs in at the start. Once a role logs in, Postgres trusts every query that fits that role. Local prompts only ask the user who is sitting at that specific laptop. They do not bring in a team lead or security reviewer for sign-off.

Native roles also cannot hide sensitive data inside the rows an agent reads. When an agent runs a select query, it pulls full emails and card numbers. To protect private fields, masking must rewrite matched fields in results before delivery. Finally, local agent checks do not create a central log of every query run.

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. It runs beside your database and reads the Postgres wire protocol. 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 check the statement by its effect, table, or pattern. They refuse bad deletes or drops with a real Postgres error. On the way back, hoop.dev data masking rewrites sensitive values in returned rows based on your rules. Every query and 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

Can Goose run queries on Neon without human review?

Yes, if you set the agent to run tasks on its own with a write key. To prevent this, enable local confirmation prompts and use read-only Postgres roles by default.

How do Neon branches help with AI agent safety?

Branches give the AI agent an isolated copy of your database schema and data. If an approved query breaks a table, your live production branch remains untouched.

How can teams protect sensitive columns during agent queries?

Standard Postgres roles grant access to whole tables or columns rather than hiding specific text. Data masking rewrites matched fields like phone numbers or national IDs in query results.

The query runs. The emails stay hidden.