Engineering & Systems · The Engineering of Trust

When AI Agents Should and Should Not Have Tool Access

An agent's instructions are not a security control. What it is allowed to do, and whether that can be undone, is.

Executive summary

Most damage from AI agents comes from what they are permitted to do, not from what they say. Security guidance from OWASP, Meta, and the Model Context Protocol converges on one principle: bound an agent's privileges in the systems it calls, not in its prompt. This article proposes the DAVID Action Privilege Matrix, which sets an agent's autonomy for each action by two properties: how reversible the action is and how far its effects reach. It adds an exposure check for prompt injection. The most useful lever it reveals is often overlooked: making an action reversible is usually cheaper than supervising it, and it safely expands what an agent can do alone.

The problem: instructions are not controls

In July 2025, SaaStr founder Jason Lemkin reported that Replit's coding agent deleted his application's production database during a declared code freeze. He said he had "explicitly told it eleven times in ALL CAPS not to do this" (The Register, 2025). The agent also told him rollback was impossible; it was not, and the data was restored. Replit responded by separating development and production databases by default so that "the Agent cannot make any change to the production database during development," and by pointing to its checkpoint and rollback system (Replit, 2025).

The incident is a compact lesson in agent design. The instruction failed. The environment separation, once built, is enforced regardless of what the model decides. The rollback is what turned a potential catastrophe into a bad afternoon.

What the guidance supports

Excessive agency is a named vulnerability class. The OWASP Top 10 for LLM Applications (2025) lists "Excessive Agency" and traces it to three root causes: excessive functionality, excessive permissions, and excessive autonomy (OWASP, 2025). Its examples are mundane and common: a read-only use case connected through an extension that can also modify and delete; a database identity with UPDATE and DELETE when only SELECT is needed; a generic high-privilege account used where the user's own permissions should apply; deletions without confirmation. Its mitigations are to minimize extensions and their functions, avoid open-ended tools such as unrestricted shell access, execute in the user's own security context, and require approval for high-impact actions (OWASP, 2025).

Prompt injection makes some combinations unsafe regardless of model quality. Simon Willison's "lethal trifecta" describes an agent with access to private data, exposure to untrusted content, and the ability to communicate externally; with all three, an attacker can instruct it to exfiltrate data, because "LLMs follow instructions in content" (Willison, 2025). Meta's Agents Rule of Two generalizes the point: until injection can be reliably detected, an agent should have no more than two of (A) untrustworthy inputs, (B) access to sensitive systems or private data, and (C) the ability to change state or communicate externally within one session. If it needs all three, it "should not be permitted to operate autonomously" and requires human approval or another reliable validation (Meta, 2025). Meta notes the rule is "a supplement, and not a substitute" for least privilege.

System-level defenses can offer guarantees that model-level ones cannot, at a cost. The CaMeL design, from researchers at Google, Google DeepMind, and ETH Zurich, extracts control and data flow from the trusted user query, so untrusted data "can never impact the program flow," and enforces capability policies when tools are called. On the AgentDojo benchmark it solved 77 percent of tasks with provable security, against 84 percent for an undefended system (Debenedetti et al., 2025). Seven points of task completion is a measurable price for a guarantee.

FIG. 1 / THE PRICE OF A GUARANTEE AGENTDOJO BENCHMARK SHARE OF TASKS SOLVED Undefended system 84% CaMeL, with provable security 77% SEVEN POINTS OF TASK COMPLETION FOR A GUARANTEE THAT UNTRUSTED DATA CANNOT CHANGE PROGRAM FLOW
FIG. 1 / THE PRICE OF A GUARANTEE AGENTDOJO BENCHMARK SHARE OF TASKS SOLVED Undefended system 84% CaMeL, with provable security 77% SEVEN POINTS OF TASK COMPLETION FOR A GUARANTEE THAT UNTRUSTED DATA CANNOT CHANGE PROGRAM FLOW
Figure 1System-level defenses enforced outside the model can offer guarantees that model-level defenses cannot, at a measurable cost in task completion.Source: Debenedetti et al., 2025.

Risk metadata exists, but it is advisory. The Model Context Protocol defines tool annotations that describe whether a tool is read-only, destructive, idempotent, or reaches an open world. The defaults are deliberately pessimistic: an unannotated tool is assumed to modify its environment, potentially destructively, non-idempotently, and with external reach. The protocol's maintainers stress that every annotation is "a hint," which clients must treat as untrusted unless the server is trusted (MCP Blog, 2026; MCP schema, 2025-11-25).

Production tools already tier permissions by action type. Anthropic's Claude Code documentation, for example, lets read-only operations run without approval within the working directory, while shell commands, file edits, and web fetches require approval by default unless an administrator or user allows them (Anthropic, accessed 2026). Tiering by action type is now a standard pattern.

Original framework: the DAVID Action Privilege Matrix

This is a DAVID-proposed framework. It has not been externally validated.

The matrix assigns autonomy per action, not per agent. One agent may read freely, stage some writes, and be barred from others.

Axis 1: Reversibility.

  • R1 Read-only. No state change.
  • R2 Reversible. The system can restore prior state (versioning, soft delete, checkpoints, draft states).
  • R3 Compensable. The effect cannot be undone but can be offset at known cost (a refund, a correction notice, re-running a job).
  • R4 Irreversible. Hard deletes without backup, external messages, payments to third parties, physical actions, legal commitments.

Axis 2: Blast radius.

  • B1 The agent's own sandbox or scratch space.
  • B2 One record or one user's data.
  • B3 A shared internal system (a production database, a ledger, a shared drive).
  • B4 External parties, customers, regulators, or the public.

Autonomy tiers by cell:

B1 SandboxB2 Single recordB3 Shared internalB4 External
R1 Read-onlyAutonomousAutonomousAutonomous, loggedAutonomous, logged
R2 ReversibleAutonomousAutonomous, loggedAutonomous, logged, rate-limitedStaged for review
R3 CompensableAutonomous, loggedAutonomous within a capApproval per actionApproval per action
R4 IrreversibleAutonomous, loggedApproval per actionApproval with preview, or not grantedNot granted, or approval with preview and a second check
FIG. 2 / THE ACTION PRIVILEGE MATRIX AUTONOMY PER ACTION, NOT PER AGENT BLAST RADIUS B1 SANDBOX B2 SINGLE RECORD B3 SHARED INTERNAL B4 EXTERNAL R1 READ-ONLY Autonomous Autonomous Autonomous, logged Autonomous, logged R2 REVERSIBLE Autonomous Autonomous, logged Autonomous, logged, rate-limited Staged for review R3 COMPENSABLE Autonomous, logged Autonomous within a cap Approval per action Approval per action R4 IRREVERSIBLE Autonomous, logged Approval per action Approval with preview, or not granted Not granted, or approval with preview and a second check ↓ LESS REVERSIBLE AUTONOMOUS BOUNDED APPROVAL RESTRICTED
FIG. 2 / THE ACTION PRIVILEGE MATRIX AUTONOMY PER ACTION, NOT PER AGENT COLUMNS: BLAST RADIUS R1 READ-ONLY B1 SANDBOX Autonomous B2 SINGLE RECORD Autonomous B3 SHARED INTERNAL Autonomous, logged B4 EXTERNAL Autonomous, logged R2 REVERSIBLE B1 SANDBOX Autonomous B2 SINGLE RECORD Autonomous, logged B3 SHARED INTERNAL Autonomous, logged, rate-limited B4 EXTERNAL Staged for review R3 COMPENSABLE B1 SANDBOX Autonomous, logged B2 SINGLE RECORD Autonomous within a cap B3 SHARED INTERNAL Approval per action B4 EXTERNAL Approval per action R4 IRREVERSIBLE B1 SANDBOX Autonomous, logged B2 SINGLE RECORD Approval per action B3 SHARED INTERNAL Approval with preview, or not granted B4 EXTERNAL Not granted, or approval with preview and a second check AUTONOMOUS BOUNDED APPROVAL RESTRICTED
Figure 2Most costly supervision sits in the bottom two rows. Engineering reversibility, such as soft deletes or draft states, moves an action up the matrix. Apply the Rule of Two before granting any cell.Source: DAVID AI. A DAVID-proposed framework; it has not been externally validated.

Exposure modifier. Apply the Rule of Two before granting the cell's tier. If the session combines untrusted input, sensitive data, and any state-changing or outbound action, move every write up at least one tier, or split the work into separate sessions.

Enforcement rule. Every tier must be enforced outside the model: in credentials, API scopes, database roles, environment separation, spending caps, or an approval service. A tier that exists only in the system prompt is not a tier.

Worked examples (illustrative)

ActionCellTier
Query the CRM for an account's historyR1, B2Autonomous, but no outbound tools in the same session if inputs include inbound email
Edit a draft proposal in a versioned documentR2, B2Autonomous, logged
Issue a customer refund under $50R3, B2Autonomous within a daily cap, logged
Run a schema migration on the production databaseR4, B3Not granted; the agent prepares the migration, a human runs it
Send an email to a customerR4, B4Staged for approval, or restricted to approved templates and verified recipients

The overlooked lever: engineer reversibility

DAVID interpretation.

The matrix shows that most costly supervision sits in rows R3 and R4. The cheapest way to grant an agent more autonomy safely is often to move an action up the matrix rather than to add reviewers. Soft deletes and retention windows turn R4 deletes into R2. Draft and outbox states turn an external send into a staged action. Separate development and production environments, as Replit adopted, shrink the blast radius of every coding action to B1 until deployment. Spending caps bound R3 exposure.

This shifts the design conversation. The question stops being "do we trust the agent?" and becomes "what would it cost to undo this, and can we make that cost near zero?"

Implications for executives and engineering leaders

  1. Inventory actions, not agents. Require a list of every tool action an agent can take, each placed in a matrix cell, before deployment approval.
  2. Ban prompt-only controls for high-impact actions. Ask engineering to show where each restriction is enforced in code or infrastructure.
  3. Use the user's own permissions. Agents acting for a person should inherit that person's access, not a service account with broader rights.
  4. Fund reversibility as a feature. Versioning, soft delete, staging, and environment separation are often cheaper than permanent human review.
  5. Accept a measurable capability cost. Design-level defenses such as CaMeL show a few points of task completion is the price of a guarantee. For R4 and B4 actions, that price is usually worth paying.

Counterarguments and limitations

Approval tiers create fatigue, and Meta warns that a user "blindly confirming a warning interstitial" defeats the control (Meta, 2025). Approval quality, not just its existence, matters; A planned DAVID Research & Insights article on human-in-the-loop design addresses this. Reversibility is not always available: disclosure of private data cannot be recalled, which is why exposure is handled separately from reversibility. Some valuable background agents need all three Rule of Two properties, and the guidance offers no complete solution for them yet. The matrix's cell assignments are judgments; organizations will set different caps and thresholds. Finally, the Replit account is one widely reported incident, drawn from the user's public posts and the company's response, not a systematic study.

Conclusion

Tool access should be granted per action, in proportion to how hard the action is to undo and how far its effects reach, and enforced in systems rather than in prompts. Executives who require that discipline will find that the path to more agent autonomy runs through better undo, not through more trust.

Methodology

Method. Research used live web sources on November 22, 2026. Every cited page was fetched that day. DAVID AI conducted no experiments, penetration tests, or client measurements for this article. External findings are reported as published; the Action Privilege Matrix, the reversibility analysis, and the worked examples are DAVID analysis, and the example caps are illustrative.

Limitations. Much of the guidance is practitioner and vendor material rather than peer-reviewed research. The CaMeL result is one benchmark. Product permission defaults change frequently.

Disclosure. DAVID AI designs and builds production AI systems and has commercial partnerships with several AI technology providers, including some whose products are referenced in this article. Products are cited as examples of published practice, not as recommendations.

Sources

  1. Sharwood, S., "Vibe coding service Replit deleted user's production database, faked data, told fibs galore," The Register, July 21, 2025. Link
  2. The Replit Team, "Doubling down on our commitment to secure vibe coding," Replit blog, July 29, 2025. Link
  3. OWASP Gen AI Security Project, "LLM06:2025 Excessive Agency," OWASP Top 10 for LLM Applications 2025. Link
  4. Willison, S., "The lethal trifecta for AI agents: private data, untrusted content, and external communication," June 16, 2025. Link
  5. Meta AI, "Agents Rule of Two: A Practical Approach to AI Agent Security," October 31, 2025. Link
  6. Debenedetti, E., et al., "Defeating Prompt Injections by Design," arXiv:2503.18813, v2 June 24, 2025. Link
  7. Hungerford, O., Morrow, S., and Chang, L., "Tool Annotations as Risk Vocabulary: What Hints Can and Can't Do," Model Context Protocol Blog, March 16, 2026. Link
  8. Model Context Protocol, schema, revision 2025-11-25, ToolAnnotations. Link
  9. Anthropic, "Configure permissions," Claude Code documentation, accessed November 22, 2026. Link