The Friday Deploy That Taught Our Agent to Stop
Friday, 3:40 p.m., on the billing release
We gave a coding agent a narrow task: fix a retry bug in the billing service before the release candidate went out. It found the relevant handler, added a backoff, and ran the unit tests. Then it noticed that the database migration might also need a change.
That was the moment the task stopped being routine. The migration could affect existing invoices, and the agent had no reliable way to confirm how production data was shaped. It drafted a migration anyway. On review, the SQL would have reset a retry counter for every invoice, not just the affected records.
The failure was not that the agent wrote code. It was that our instructions treated every next step as equally authorized. We had specified the outcome, but not the boundary between making a local change and taking a consequential action.
The field test: three boundary conditions
We reran the task with three explicit stop conditions. The agent could proceed without asking while changes were local, reversible, and covered by the available tests. It had to pause before changing persisted data, altering public interfaces, or taking an action that could affect customers or shared systems.
We also told it what to include when it paused: the uncertainty, the options it considered, the likely impact, and the exact decision needed from a person. “Should I continue?” was not enough. A useful pause should make the next human decision small and informed.
On the second run, the agent fixed the handler, ran the tests, and stopped before writing a migration. It reported that the current schema could not distinguish a retryable failure from an already processed invoice. It proposed two options: keep the change in application code and defer the migration, or approve a migration after a data review.
The team chose the first option for the release. The agent prepared a patch and a follow-up note. The release stayed on schedule, and the production-data decision moved to a review with the people who owned that risk.
What should trigger a pause
In this test, “ask before anything uncertain” was too broad. It caused interruptions for details the agent could resolve by inspecting the repository. “Never ask unless blocked” was too loose. It encouraged the agent to turn missing context into assumptions.
These conditions gave us a workable middle ground:
- Pause before destructive or difficult-to-reverse operations, including data migrations and bulk edits.
- Pause before changing authentication, authorization, billing, or other behavior with direct customer impact.
- Pause when requirements conflict, or when a missing product decision would change the implementation.
- Pause before publishing, deploying, or sending information outside the team unless that action was explicitly authorized.
- Continue through routine investigation, local edits, and tests when those actions fit the task and can be reviewed.
Boundaries should describe authority, not just risk. “Be careful with production” leaves room for interpretation. “Do not run production commands or change persisted data without approval” is testable. So is “you may edit files in this service and run its local test suite.”
The recommendation for your next agent task
Write the stop conditions into the task before handing it off. Name the actions the agent may take, the actions that require approval, and what evidence it should bring back when it stops. Keep the boundary close to the work: a documentation edit needs less oversight than an account-permission change.
Then inspect the first pause. If the agent asks about something a repository search or test could answer, clarify its permission to investigate. If it proceeds through a decision that belongs to a human, tighten the boundary. The goal is not fewer questions at any cost. It is fewer low-value interruptions and no silent guesses with meaningful consequences.
For teams trying this workflow across coding tools, RelayVano offers pay-as-you-go access to models including Claude Sonnet 5.5 through Claude Code, Codex, Gemini CLI, and OpenAI-compatible SDKs at https://api.relayvano.com. Sign up for RelayVano to test the same task boundaries with the tools your team already uses.