Least privilege has a hidden assumption: that you can know in advance what an identity needs, set it once, and leave it. That works for a job role. It falls apart for an autonomous agent, because the agent's needs change from task to task and run to run. You cannot enumerate them ahead of time, so the tempting shortcut is to grant broadly and stop thinking about it. That is the opposite of least privilege, and agents make the shortcut feel reasonable.
The overlap, and the tension
Least privilege says an identity should hold only the access it needs to do its job, and no more. An autonomous agent's job is not fixed. One task needs read access to a reporting table. The next needs to run a migration. The next touches a different service entirely. If you set a single static grant that covers all of them, the agent is over-privileged most of the time. If you set it narrowly, the agent fails on the task you did not anticipate.
The tension is real, and you do not resolve it by guessing better. You resolve it by changing when the grant happens. Instead of provisioning for every possible task up front, grant the privilege the current task needs, at the moment it needs it, and remove it after. Least privilege becomes a property of each task rather than a static role you have to predict.
This also fixes the slow rot that kills least privilege in practice. Static grants only ever grow. Someone adds a permission to unblock an agent on a Friday, the task changes, and the permission stays because nobody remembers why it was added or dares remove it. Six months later the agent holds a pile of privileges no current task uses. Task-scoped grants do not accumulate, because each one expires when its task ends, so there is no residue to audit and prune later.
Why the agent cannot enforce its own least privilege
You might think the agent could just request narrow permissions itself. It cannot be trusted to, for the same reason you do not let a process audit itself. A compromised or misdirected agent will request whatever it wants. The decision about what privilege to grant has to be made and enforced outside the agent, on the connection to the infrastructure, where the agent cannot widen its own grant.
