Query checks
Vuon checks every query your agent sends through a governed query server before it reaches your warehouse. When the agent uses the wrong table, metric, or join, Vuon can block the query and hand the agent the error, so it fixes the SQL before anyone sees a wrong number.
Overview
A query check reads the SQL the agent wrote, resolves every table and column against your connection's catalog, and compares what the query does with what your team has declared: metric definitions, joins, row validity, and column meanings from your semantic layer and Vuon's documentation.
Checks run on every governed query server: BigQuery, Snowflake, Databricks, and Redshift. Each check is recorded on Settings → Query checks, whether or not the query was blocked. See Monitoring.
What the checker looks for
| Check | Catches |
|---|---|
| Catalog | Tables and columns that don't exist or are hidden from agents, with a suggestion when a name is close. |
| Semantic joins | Joins your semantic layer doesn't declare, and dimensions used as columns of the wrong table. |
| Metric binding | A column that claims to be a governed metric but is computed differently from its definition. |
| Fan-out | SUM, COUNT, or AVG over a join that can repeat rows, which double-counts. |
| Row validity | Rows your documentation says to exclude, such as test accounts or soft-deleted records. |
| Time bounds | Date ranges that cut off at midnight in the wrong place, durations that can go negative, and events outside an entity's lifecycle. |
| Aggregation | Nested aggregates and statistics over a population that silently omits entities with no rows. |
| Read-only | Anything other than a read-only query. |
| Performance | Scans of very large tables repeated across CTEs or subqueries. |
The checker understands each warehouse's SQL dialect. The more your team has declared, in Vuon or upstream, the more it can catch.
Enforcement modes
Each agent's client has an enforcement mode. Every query is checked and recorded in every mode; the mode decides what happens to a query the checker would reject.
| Mode | Behavior |
|---|---|
| Observe | Runs every query and records what the checker would have blocked. New clients start here. |
| Standard | Blocks queries the standard checks reject. |
| Strict | Also blocks on correctness findings about the SQL's meaning: row validity, lifecycle, session attribution, versioned definitions, and negative durations. |
Start a new agent in Observe, read what Query checks records for a few days, then move it to Standard or Strict from the client's page.
What the agent sees
A blocked query is not run. The agent gets a tool error that starts "Vuon checked this query and did not run it", followed by each error and warning with its line and column, and "Fix the SQL and run it again; the same SQL is refused again." Agents built on any framework can use this to correct the SQL and retry without extra prompting.
Queries that run with warnings return the warnings alongside the rows, so the agent can mention them in its answer.
On Monitoring, a blocked query whose next query in the same conversation passed counts as Recovered.
Caps
Every query is also held to the client's caps, in addition to the checker:
- Bytes scanned. A dry run estimates the scan first. A query over the client's cap is refused before it runs, with a suggestion to narrow it. Without a client cap, a 100 GB per-query default applies.
- Job timeout. The shorter of the client's timeout and the call's own wins.
- Daily budget. Every query counts against your workspace's daily warehouse scan budget.
FAQ
Does checking slow the agent down?
A check typically adds milliseconds, not seconds. Query checks shows the checker's p50 and p95 for each client.
Can I check queries from Vuon's own agents too?
Yes. Vuon's in-app agents use the same checker, and their queries appear on Query checks under Vuon agents.
What if a block is wrong?
Mark the issue Expected on Query checks, or ignore it for 24 hours, until it happens 10 more times, or forever. If the cause is a gap in your definitions, Autofix proposes the change.