Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 2 min read

An AI Agent Can Stay Within Its Permissions and Still Do the Wrong Thing

The first authorization check is often the least important one. A user asks an agent to update a supplier record. The request is approved. The agent has permission to read the supplier system and write changes. Then th

The first authorization check is often the least important one.

A user asks an agent to update a supplier record. The request is approved. The agent has permission to read the supplier system and write changes.

Then the plan changes.

The agent decides it needs to export related payment details, call a second system, or update several records instead of one. The original authorization may still be technically valid, but it no longer represents what the agent is about to do.

That is the failure mode: authorization gets attached to the conversation, while risk changes with every new action.

A hypothetical failure

Imagine an internal procurement agent asked to correct a supplier's address.

Its first plan is simple:

  1. Find the supplier record.
  2. Update the address.
  3. Confirm the change.

The agent cannot find the supplier using the provided name. It revises the plan:

  1. Search invoices for a matching company name.
  2. Read payment records to confirm the identity.
  3. Update the supplier profile.
  4. Notify the finance system.

The agent may still be operating under the same user session and the same broad permission set. But the risk has moved. It is now reading financial data and writing to another system.

If authorization was checked only when the task began, the new actions inherit trust they did not individually earn.

The control to inspect

Treat every material plan change as a new authorization decision.

That does not mean asking a human to approve every tool call. It means the policy layer should re-evaluate the action using the current plan, target, data scope, tool, and expected side effect.

A useful rule for platform teams is:

The agent should be authorized for the action it is taking, not the request it originally received.

In practice, inspect four points:

  • Plan transition: Did the agent add a tool, system, record type, or data category?
  • Scope expansion: Did one record become many, or a lookup become an export?
  • Side-effect change: Did a read become a write, notification, transfer, or deletion?
  • Reason change: Can the agent explain why the new action is needed for the user's goal?

If any answer changes the risk, pause the action and run policy again. For a high-impact change, require human approval with the exact proposed action, not a vague message saying the agent needs β€œmore access.”

What should be recorded

The audit trail should show the original request, the plan version, the authorization decision, the plan change, and the control outcome.

Without that sequence, a later reviewer sees only that the agent had permission. They cannot see when the permission stopped matching the work.

For enterprise AI, that distinction matters. A well-authorized agent can still become unsafe when its plan drifts. Runtime authorization has to follow the plan, not trail behind it.

Learn more about AXEC and schedule a meeting

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.