The control assumption changes from single-prompt output to delegated execution. Once a model can plan, act, and check its own work, it can chain weak signals into stronger offensive outcomes. The practical failure is not the model alone, but the absence of runtime scope limits, validation, and approval boundaries around the agent.
What actually changes when the model is no longer just generating text?
The break point is the shift from prediction to delegation. A model with tool access can now cause side effects, query systems, modify records, or hand work to other components, so the control question becomes whether each action is bounded, attributable, and reversible. That is why the right comparison is not “better model versus worse model,” but “contained suggestion versus operating actor.”
In that setting, the model’s output is only one step in a larger execution chain. The agent harness becomes part of the security boundary because it decides which tools exist, what state the model can see, and whether a proposed action is allowed to execute without further review.
Once memory is added, the failure mode widens from single-turn abuse to persistence across turns and sessions. Memory can improve task continuity, but it also creates a place for poisoned context, stale assumptions, or sensitive material to survive long enough to influence later decisions.
Why tool use and memory create a bigger attack surface
Tool access turns prompt quality into operational risk. A weak instruction, injected string, or misleading external input can be converted into a real action if the harness trusts the model too much, especially when the tool can move money, send messages, fetch data, or change permissions.
Memory adds an additional trust boundary because the system starts reusing prior context as if it were reliable state. If that stored state is writable, shared too broadly, or retained too long, it can amplify cross-session leakage, contaminate future decisions, or silently preserve an attacker’s influence.
That is why the practical security problem is closer to delegated authority than to chatbot safety. The stronger the available tools and the broader the retained memory, the more important it becomes to constrain scope, isolate state, and validate every action against policy before execution.
What the harness must control for the agent to stay safe
The harness should define the model’s authority, not merely host it. In practice that means separating planning from execution, limiting tool scope to the current task, and making high-impact actions require an explicit approval boundary or policy decision.
It also means treating memory as governed data, not as a convenient scratchpad. Sensitive values should stay out of durable memory, writes should be controlled, and retrieval should be scoped so one task, user, or workspace cannot inherit another’s assumptions or secrets.
AI Agent Authorisation Guide is useful here because the core failure is over-broad delegated action, not model intelligence. For memory-specific control choices, AI Agent Memory Security Guide helps distinguish useful persistence from unsafe retention, while AI Agent Observability, Audit and Incident Response Guide addresses the need to trace what the agent actually did.
Risk and Threat Considerations
When a model can call tools and retain state, attackers gain a way to turn small prompt manipulations into real-world effects. The main risk is not that the model “hallucinates,” but that a mistaken or malicious instruction gets translated into an authenticated action, a data leak, or a privilege-abusing workflow.
Failure mechanism: The agent harness trusts model output too broadly, allows memory to carry untrusted context forward, or exposes tools whose blast radius exceeds the task’s legitimate scope. That creates a path for prompt injection, tool misuse, memory poisoning, and escalation through chained actions.
Impact: An attacker can steer the agent into exfiltrating data, making unauthorized changes, abusing connected accounts, or repeating unsafe behaviour across sessions. At scale, the same weakness can turn many low-risk interactions into a durable operational compromise.
Standards & Framework Alignment
This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.
OWASP Agentic AI Top 10 and OWASP Non-Human Identity Top 10 address the attack surface, NIST SP 800-53 Rev 5 sets the technical controls, and ISO/IEC 27001:2022 defines the regulatory obligations.
| Framework | Control / Reference | Relevance |
|---|---|---|
| OWASP Agentic AI Top 10 | ASI03 — Identity & Privilege Abuse | Tool access and delegated authority make privilege abuse a core agent risk. |
| ASI02 — Tool Misuse | The question centers on what breaks when tools are exposed to an agent. | |
| ASI06 — Memory & Context Poisoning | Added memory creates persistence risks from contaminated or unsafe context. | |
| Recommendation — Enforce per-action authorization and keep agent privileges tightly bounded. Restrict tools to task-scoped use and validate each invocation before execution. Isolate agent memory and block sensitive or untrusted data from durable retention. | ||
| OWASP Non-Human Identity Top 10 | NHI-02 — Secret Leakage | Agent memory and tool use can expose secrets through retained context or logs. |
| NHI-07 — Long-Lived Secrets | Delegated agents often fail when durable credentials outlive the task they support. | |
| Recommendation — Keep credentials and tokens out of agent memory and rotate anything exposed. Replace durable secrets with short-lived, task-scoped credentials wherever possible. | ||
| NIST SP 800-53 Rev 5 | AC-6 — Least Privilege | The harness must bound what the agent can do once tools are available. |
| AU-2 — Event Logging | Agent side effects must be attributable for review and incident response. | |
| IA-5 — Authenticator Management | Tool access often depends on token and secret lifecycle control. | |
| Recommendation — Limit agent permissions to the minimum set needed for the current task. Log tool invocations, approvals, and state changes with enough detail to reconstruct actions. Rotate, scope, and retire agent credentials before they become reusable attack paths. | ||
| ISO/IEC 27001:2022 | A.5.15 — Access control | Agent tool use is fundamentally an access-control problem. |
| A.8.2 — Privileged access rights | Agent harnesses often fail when privileged actions are too broadly exposed. | |
| Recommendation — Define and enforce access rules for each agent capability and connected system. Review and constrain privileged agent access as tightly as human privileged access. | ||
Practitioner Guidance
What to verify: Confirm that every tool is scoped to a narrow task, every high-impact action has a policy gate, and every memory write has a business reason. If you cannot explain why the agent needs a capability, it is already too much authority.
Decision rule: If the agent can affect production data, customer accounts, or external systems, require explicit approval, logging, and rollback before execution. If it only drafts or recommends, keep it read-only and treat tool execution as a separate control plane.
What good looks like: The agent can complete useful work without retaining secrets, inheriting unrelated context, or silently crossing trust boundaries. You should be able to attribute every significant action to a request, a policy decision, and a recorded execution trail.
Practitioner takeaway: The safest agent is not the one with the most memory or tools, but the one whose authority is smallest at the moment of action and whose side effects are easiest to inspect, limit, and undo.
Related resources from NHI Mgmt Group
Deepen Your Knowledge
Free weekly newsletter
Subscribe to the NHI & AI Identity Journal
The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.
Bonus 33% off our NHI Course when you subscribe.
Reviewed and updated by the NHIMG editorial team on October 12, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org