<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/human-in-the-loop-without-killing-throughput-1azmg25jp" -->

---
title: Human-in-the-Loop Without Killing Throughput | daily.dev
description: An engineering team describes how a text-to-SQL agent's overly broad human-approval gate (any non-SELECT action required review) led to a near-catastrophic...
canonical: https://daily.dev/posts/human-in-the-loop-without-killing-throughput-1azmg25jp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Human-in-the-Loop Without Killing Throughput | daily.dev
og:description: An engineering team describes how a text-to-SQL agent's overly broad human-approval gate (any non-SELECT action required review) led to a near-catastrophic...
og:url: https://daily.dev/posts/human-in-the-loop-without-killing-throughput-1azmg25jp
og:image: https://api.daily.dev/og/posts/1aZmg25Jp.png
og:image:alt: Human-in-the-Loop Without Killing Throughput
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Human-in-the-Loop Without Killing Throughput

**[Towards Data Science](https://daily.dev/sources/tds)** · 11 min read · 0 upvotes · 0 comments

## Summary

An engineering team describes how a text-to-SQL agent's overly broad human-approval gate (any non-SELECT action required review) led to a near-catastrophic accidental DELETE and, later, to review fatigue where analysts waited up to forty minutes and reviewers began rubber-stamping queries in batches. The fix was risk-based routing: scoring each agent action on blast radius (actual row count capped at a ceiling rather than unreliable EXPLAIN estimates), table sensitivity (a fixed allowlist for billing/auth/regulatory tables), semantic distance from previously approved query intents, and agreement across resampled generations (rather than trusting model-reported confidence). Only actions clearing a risk threshold get escalated to a human; everything else executes automatically. They also decoupled the user experience from the review queue, turning escalations into ticket-style notifications instead of blocking spinners. Reviewers proved most valuable on ambiguous, high-blast-radius requests and added little value on mechanically correct, low-risk ones. The team retunes router weights manually rather than closing the feedback loop automatically, citing distrust of a safety system that grows more permissive on its own.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://towardsdatascience.com/human-in-the-loop-without-killing-throughput>

## Questions this post answers

### What signals should determine whether an AI agent's database action needs human review before executing?

Four signals work well: blast radius (actual row count touched, capped at a bounded ceiling like 50,000 rather than relying on unreliable EXPLAIN estimates), table sensitivity (a static allowlist flagging billing, auth, or regulatory tables as always high-risk), semantic distance from previously approved query intents via an embedding index, and agreement across two or three resampled generations at higher temperature instead of the model's own token-level confidence, which is poorly calibrated.

_daily.dev surfaces engineering writeups like this for teams designing approval workflows around agentic actions._

### Why did a human approval queue for AI agent actions start failing even though it caught a dangerous query early on?

Routing every non-read-only action into one undifferentiated approval queue caused median wait times to creep past fifteen minutes, so reviewers began approving requests in batches while skimming several at once, degrading review quality until it became mostly rubber-stamping. The queue didn't distinguish a single-row primary-key delete from a delete touching 40% of a table, so reviewers had no signal for where to spend real attention.

_Developers tuning agent guardrails can follow practical postmortems like this on daily.dev before their own review queue collapses._

## Similar posts on daily.dev

- [Human-in-the-Loop AI: Confidence Thresholds and Risk Matrices](https://daily.dev/posts/human-in-the-loop-ai-confidence-thresholds-and-risk-matrices-zh6cv3tkk) · Medium · 0 upvotes · 0 comments
- [Is Your “Human-in-the-Loop” Actually Slowing You Down? Here’s What We Learned](https://daily.dev/posts/is-your-human-in-the-loop-actually-slowing-you-down-here-s-what-we-learned-s37uyphem) · Stack Overflow Blog · 0 upvotes · 0 comments
- [The Shift: Rethinking the Human in the Loop](https://daily.dev/posts/the-shift-rethinking-the-human-in-the-loop-wugfws7oq) · Recorded Future Blog · 0 upvotes · 0 comments
- [Agentic Code Review](https://daily.dev/posts/agentic-code-review-0ue8fcsa1) · Addy Osmani · 148 upvotes · 14 comments

---

Tags: [#llm](https://daily.dev/tags/llm), [#ai-agents](https://daily.dev/tags/ai-agents)

[View this post on daily.dev](https://daily.dev/posts/human-in-the-loop-without-killing-throughput-1azmg25jp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Human-in-the-Loop Without Killing Throughput","url":"https://daily.dev/posts/human-in-the-loop-without-killing-throughput-1azmg25jp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/human-in-the-loop-without-killing-throughput-1azmg25jp"},"datePublished":"2026-08-28T18:37:11.043Z","dateModified":"2026-08-29T16:40:01.882Z","description":"An engineering team describes how a text-to-SQL agent's overly broad human-approval gate (any non-SELECT action required review) led to a near-catastrophic...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/63b0555e031a7b04feb7563d6af0a8f1?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/63b0555e031a7b04feb7563d6af0a8f1?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Towards Data Science","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Towards Data Science","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/tds","url":"https://daily.dev/sources/tds"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/human-in-the-loop-without-killing-throughput-1azmg25jp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"llm,ai-agents","timeRequired":"PT11M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Towards Data Science","item":"https://daily.dev/sources/tds"},{"@type":"ListItem","position":3,"name":"Human-in-the-Loop Without Killing Throughput"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/human-in-the-loop-without-killing-throughput-1azmg25jp#faq","mainEntity":[{"@type":"Question","name":"What signals should determine whether an AI agent's database action needs human review before executing?","acceptedAnswer":{"@type":"Answer","text":"Four signals work well: blast radius (actual row count touched, capped at a bounded ceiling like 50,000 rather than relying on unreliable EXPLAIN estimates), table sensitivity (a static allowlist flagging billing, auth, or regulatory tables as always high-risk), semantic distance from previously approved query intents via an embedding index, and agreement across two or three resampled generations at higher temperature instead of the model's own token-level confidence, which is poorly calibrated. daily.dev surfaces engineering writeups like this for teams designing approval workflows around agentic actions."}},{"@type":"Question","name":"Why did a human approval queue for AI agent actions start failing even though it caught a dangerous query early on?","acceptedAnswer":{"@type":"Answer","text":"Routing every non-read-only action into one undifferentiated approval queue caused median wait times to creep past fifteen minutes, so reviewers began approving requests in batches while skimming several at once, degrading review quality until it became mostly rubber-stamping. The queue didn't distinguish a single-row primary-key delete from a delete touching 40% of a table, so reviewers had no signal for where to spend real attention. Developers tuning agent guardrails can follow practical postmortems like this on daily.dev before their own review queue collapses."}}]}
```

