Analytics agents can't get fixed roles: per-query, expiring permissions instead

Then_Respect_1964 · reddit · 2026-10-17

The author shares lessons from building access control for agents that query production data, mostly analytics and debugging agents. These agents can't be given a normal role: an analytics agent writes a different query per question, a debugging agent goes wherever the problem is — so you either over-grant access or block the work.

His approach: grant each request its own permission covering just that one query, approved by a human or policy, and expiring. Repeated queries reuse the approval; anything new needs fresh approval.

Two design lessons he calls out:

He published the full engineering record with these gaps and asks how others handle it: scoped roles, read replicas, or human approval flows?

Related event: Devs add per-query authorization layer for database MCP agents(2 posts)→

Original post →

More from coding & agent

coding & agent channel →