How to Configure Windsurf ClickHouse Approval

Published
Length
3 min read

Luis Felipe Dias

All posts

To set up windsurf clickhouse approval, combine local agent prompts with database roles. You limit what the AI agent can run by scoping its user permissions. Many engineering teams start by giving their coding assistant a shared database account. They rely on the local editor prompt to stop bad queries before they run. When that account has broad permissions, one fast click can drop a key table. Also, an broad read role lets the agent pull sensitive rows into your chat. How windsurf clickhouse

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 clickhouse approval, combine local agent prompts with database roles. You limit what the AI agent can run by scoping its user permissions. Many engineering teams start by giving their coding assistant a shared database account. They rely on the local editor prompt to stop bad queries before they run. When that account has broad permissions, one fast click can drop a key table. Also, an broad read role lets the agent pull sensitive rows into your chat.

How windsurf clickhouse approval works in native tools

In June 2026, Cognition renamed Windsurf to Devin Desktop while keeping the same IDE. Its built-in agent, Cascade, can run terminal commands on its own with user permission. The agent uses a dedicated terminal that loads your local shell settings and variables. It runs zsh on macOS and bash on Linux to reach your tools. It can also reach external tools through Model Context Protocol servers you set up. Because the terminal loads your shell variables, the agent inherits your stored database keys. When the agent wants to run a query, it asks for your local approval.

On the database side, ClickHouse manages users, roles, row policies, and quotas with SQL. To turn on SQL access control, an admin sets a storage folder on the server. At least one database user must have user management rights turned on. An admin with the right privilege can create a new user for the agent. That statement sets the login method, allowed hosts, default roles, and user settings. Remember that a database user can only grant rights that they already hold themselves.

Scoping database reads with column grants

You can tighten what the agent reads by granting rights on single columns. If you grant read rights on two columns, the agent can query only those. Any query that asks for a third column will fail right away. A full table query with a wildcard will also fail and return no data. It only works if the table holds just the columns you granted. Since version 24.10, you can also grant rights across tables using a name prefix. You put an asterisk at the end of the table prefix in your grant.

What native setup solves and what it misses

Native roles and local terminal prompts solve the first part of access control. The database checks who logs in and which columns that account can read. The desktop editor asks the developer before the agent starts a shell command. This stops unknown users from logging in and blocks basic mistakes in the terminal.

Approval Chains & Escalation + ClickHouse Access Management: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, this setup leaves a big gap during daily work. Database grants are static and apply to every query from that user account. They cannot ask a team lead for approval when an agent runs a write query. Also, local editor prompts ask the user who is already running the agent. Tired developers often click approve on long SQL strings without reading every line. Finally, column grants are all or nothing for the columns you allow. If an allowed column holds emails, phone numbers, or card numbers, the agent gets them. Native roles cannot rewrite matched fields in results while keeping the query working.

Check ClickHouse queries and results before execution

Access control in ClickHouse is essential setup. Setup alone does not check single queries for risk or rewrite sensitive strings in returned rows. By design, hoop.dev sits inline in the protocol beside the server as a sidecar for your ClickHouse. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human approval.

First, hoop.dev guardrails block disallowed deletes, drops, and alter mutations or hold them for review. Then hoop.dev data masking rewrites sensitive string columns in responses in memory and logs each decision per resource. Read the docs and source on GitHub.

Frequently asked questions

Did Windsurf change its name to Devin Desktop?

Yes, on June 2, 2026, Cognition renamed Windsurf to Devin Desktop. It keeps the same IDE features, and old help links redirect to the new docs.

Why does a wildcard query fail when using ClickHouse column grants?

ClickHouse blocks wildcard queries when a user only has rights on specific columns. The query returns no data unless the table holds only the permitted columns.

How does the Cascade agent reach my ClickHouse database?

The agent runs commands in a local terminal that loads your shell variables. It can also use Model Context Protocol servers that you set up locally.

The query runs. The emails stay hidden.