snowflake warehouse suspended when agent tried row count check, check failed
Teaches agents to handle suspended Snowflake warehouses during checks: detecting suspension, resuming deliberately, and cheap alternatives. Use when a check fails because the warehouse is suspended. Not for checks failing on a running warehouse.
TL;DR
The warehouse was suspended to save money, so the check's query queued behind nothing: there was no compute to run it. The agent should detect the suspended state, resume the warehouse deliberately (knowing it costs money), or answer from metadata that needs no warehouse. Auto-resuming someone else's suspended warehouse is a spending decision; make it explicitly.
snowflake warehouse suspended when agent tried row count check, check failedUse this when
- An agent's Snowflake check fails on a suspended warehouse.
- The warehouse was suspended for cost savings.
- The agent is unsure whether to resume it.
Not for this skill when
- The warehouse runs but the check is slow. That is a query problem.
- The check returns wrong results. That is a logic problem.
Steps
- Check the warehouse state before the query: suspended, resuming, or running. Note the state. Verify: the situation is diagnosed, not guessed
- Decide: resume deliberately for a needed check, or answer from information schema metadata. Note the decision and its cost. Verify: the spending decision is explicit
- If resuming, allow for resume latency in the agent's wait budget. Note the adjusted budget. Verify: the wait accounts for reality
- Prefer metadata answers for routine checks: row counts from information schema need no warehouse. Note the cheaper path. Verify: routine checks stop needing compute
- Record the resume event with who authorized it. Note the audit trail. Verify: spending is traceable
Variant phrasings
snowflake warehouse suspended auto resume
The behavior phrasing.
snowflake check without warehouse
The cheap-alternative search.
Compatibility: Snowflake warehouses and information schema. Auto-resume behavior is per warehouse config.
Why it happens
Suspended warehouses are a cost control: no compute, no bill, but also no queries. Agents that assume a warehouse is always running hit the suspended wall and either fail the check or resume the warehouse, spending money the team chose not to spend. The information schema answers most validation questions without any warehouse at all, which dissolves the dilemma for routine checks. For the rest, resuming is fine as long as it is a decision, not a reflex.
Edge cases / pitfalls
- Auto-resume triggers on any query, including accidental ones. A misconfigured agent can resume warehouses all day.
- Resume latency varies from seconds to minutes. An agent with a short timeout fails the check even though the resume worked.
- Multi-cluster warehouses resume differently than single-cluster. Know the warehouse's shape before waiting on it.
- Some teams suspend aggressively on schedules. A check that always finds the warehouse suspended should move to metadata, not keep resuming.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst5tuneGR1gW2Bz_E6FFxiw