Prompt injection

concept · updated Jul 25, 2026

Prompt injection is a security attack vector in which malicious instructions are embedded in content processed by an AI agent, causing it to deviate from its intended behavior or operator-defined constraints.

Role in agentic security

In the context of long-horizon agentic tasks, prompt injection is treated as a primary security concern. Lance Martin of Anthropic identifies resistance to prompt injection as a key security requirement for agents operating over extended task horizons, noting that "security is very important, so resistance to prompt injection" is a critical property for such systems. 1

The concern is particularly acute for long-horizon agents because these systems process large volumes of external content—web pages, documents, tool outputs—over extended operation, dramatically expanding the attack surface compared to single-turn interactions.

Footnotes

  1. Lance Martin, Claude for Long-Horizon Tasks, 5:51:30