# Your Agent Ran Overnight. Here Is What It Got Wrong.

DevFeed: [Your Agent Ran Overnight. Here Is What It Got Wrong.](<https://devfeed.tech/articles/your-agent-ran-overnight-here-is-what-it-got-wrong-96172.md>)

Original publisher: [Read original article](<https://medium.com/snowflake/your-agent-ran-overnight-here-is-what-it-got-wrong-98a8117e466a?source=rss----34b6daafc07---4>)

Author: Kathleen Prince-Sayward

Published: 2026-10-22T17:01:02Z

Content type: article

Language: en

Sources: [Snowflake Builders](<https://devfeed.tech/sources/snowflake-builders.md>)

Topics: [Pull Request](<https://devfeed.tech/topics/pull-request.md>), [reliability-engineering](<https://devfeed.tech/topics/reliability-engineering.md>), [CI/CD](<https://devfeed.tech/topics/cicd.md>), [Test automation](<https://devfeed.tech/topics/test-automation.md>), [human in the loop agent](<https://devfeed.tech/topics/human-in-the-loop-agent.md>)

Tags: [agent](<https://devfeed.tech/tags/agent.md>), [agents](<https://devfeed.tech/tags/agents.md>), [ai-agent](<https://devfeed.tech/tags/ai-agent.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [automation](<https://devfeed.tech/tags/automation.md>), [avoid](<https://devfeed.tech/tags/avoid.md>), [away](<https://devfeed.tech/tags/away.md>), [branch](<https://devfeed.tech/tags/branch.md>), [change](<https://devfeed.tech/tags/change.md>), [chat](<https://devfeed.tech/tags/chat.md>), [ci](<https://devfeed.tech/tags/ci.md>), [cli](<https://devfeed.tech/tags/cli.md>), [coding](<https://devfeed.tech/tags/coding.md>), [coding-agent](<https://devfeed.tech/tags/coding-agent.md>), [comment](<https://devfeed.tech/tags/comment.md>), [container](<https://devfeed.tech/tags/container.md>), [control](<https://devfeed.tech/tags/control.md>), [credentials](<https://devfeed.tech/tags/credentials.md>), [data-engineering](<https://devfeed.tech/tags/data-engineering.md>), [exists](<https://devfeed.tech/tags/exists.md>), [failed](<https://devfeed.tech/tags/failed.md>), [here](<https://devfeed.tech/tags/here.md>), [snowflake](<https://devfeed.tech/tags/snowflake.md>), [software-development](<https://devfeed.tech/tags/software-development.md>), [technology](<https://devfeed.tech/tags/technology.md>)

## AI overview

The excerpt describes a Snowflake CoCo setup for unattended pull request maintenance and explains that a green scheduled run does not prove the work succeeded. Separate hourly monitor and review automations, an independent watchdog that can disable the review engine, and a weekday digest use a Snowflake state table to retain pull request history. The automation runs in a Snowflake-managed sandbox without a warehouse for its agent loop; credentials are stored as Snowflake secrets, and attached MCP servers provide external access. To limit changes, deterministic code outside the agent checks authorization, with single-use human approval tokens where required; shadow mode tests fix quality but cannot reveal loops caused by actual pushes. The excerpt's failure cases include invalid timeouts that fail before execution, misleading agent diagnoses, failed tools hidden by successful runs, tool-level warehouse settings overriding the runbook, intended MCP bindings differing from live configuration, and noisy alerts masking real failures. It recommends checking underlying errors and live object definitions, asserting on outputs, and replaying alert thresholds against historical data. CoCo is

## Source excerpt

Scheduling an unattended coding agent inside Snowflake is now a few CLI flags. Keeping it honest is the actual work. Here is the architecture we landed on, and the six failure modes that taught us why each guardrail exists. Note: CoCo automations are in public preview. Everything below describes preview functionality and may change. What you will take away: Run scheduled agents without a separate runner Split the work and add an independent watchdog Keep permission checks outside the agent Recognize six misleading failures and what to check Keeping pull requests moving unattended We wanted an agent to notice when a branch fell behind main, CI failed, or a review comment went unanswered, without someone opening a chat first. That meant scheduling runs, remembering previous work, and limiting what the agent could change. We used CoCo automations to avoid maintaining a separate runner or container. The setup was straightforward. Finding out whether the scheduled work had actually happened took more effort. The shape of it Four terms, because the words matter later: Automation: a recurring, unattended agent run. Stored as an AGENT TASK, scheduled, executing in a Snowflake-managed sandbox. No warehouse required for the agent loop itself. Runbook: the prompt. A markdown file describing what the agent should do each run, saved with the automation when you create it. MCP server: how the agent reaches the outside world, including source control and chat. Attached to the automation explicitly. State table: an ordinary Snowflake table, keyed by repository and pull request, holding everything the agent must not forget between runs. Snowflake handles the runtime, so we didn't need a separate server or runner to maintain. The automation runs as its creator, with credentials stored in Snowflake secret objects rather than CI. We split the work across separate automations rather than one large one, and that turned out to matter more than expected: A monitor runs hourly. It keeps ope