Agent Safety › Limitations and Practical Considerations
Language AI HandbookAll chapters Agent Safety › Limitations and Practical ConsiderationsOne section · Sections in this chapter10 / 12 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Agent safety is an active research area, and current techniques have real limitations that practitioners must understand. Knowing where the techniques work well and where they fall short is essential for deploying agents responsibly.
The Specification Problem
Constraints and validators work by specifying what agents should and should not do. But writing complete, correct specifications is hard. Specifications can be too narrow, blocking legitimate actions, or too permissive, allowing harmful ones. Novel situations arise that the specification writer did not anticipate. Real-world agent deployments regularly encounter edge cases where the right behavior is unclear.
This problem is related to the broader challenge of reward hacking in reinforcement learning: a system optimizing against a specification may find ways to satisfy the letter of the specification while violating its spirit. An agent told "do not delete files" might move files to a location where they are automatically garbage collected, technically avoiding deletion while achieving the same effect. An agent told "do not send emails without approval" might use a different communication channel that was not covered by the specification.
The specification problem does not have a clean technical solution. Progress comes from combining explicit specifications with monitoring (to detect unexpected behavior patterns), human review of edge cases, and iterative refinement of safety rules based on operational experience. The practical implication is that agent deployments should start conservatively, with narrow permissions and extensive oversight, and expand permissions gradually as confidence in the agent's behavior accumulates.
Scalable Oversight
Current human-in-the-loop mechanisms assume that humans can review agent actions effectively in real time. This assumption breaks down as agents become faster and more numerous. A fleet of agents each taking hundreds of actions per minute cannot be individually supervised.
Scalable oversight is an active research area exploring techniques that maintain the quality of human oversight even as the volume of agent actions grows. Several approaches are promising:
- Debate: Multiple agents argue about the correct action while a human judges the argument. The assumption is that it is easier for humans to evaluate an argument than to independently reason about a complex action.
- Amplification: Using AI assistance to help humans evaluate complex decisions, so that a human reviewer with AI support can evaluate actions that would be too complex to evaluate alone.
- Summarization: Reducing the information load on human reviewers without losing critical details. Rather than reviewing every action, reviewers see structured summaries of the most significant actions in each session.
None of these approaches fully solves the scalable oversight problem, but each reduces the ratio of human review effort to agent actions, making meaningful oversight practical at larger scales.
Adversarial Resistance
Prompt injection defenses based on pattern matching are inherently brittle. Adversaries who know the defense system can craft inputs that bypass the filters while still being interpreted as instructions by the underlying language model. The fundamental challenge is that language models capable enough to be useful agents are also capable enough to interpret obfuscated instructions.
Consider a simple obfuscation: encoding the injection in base64 and including it in the content with an instruction that says "decode the following and follow it." A keyword-based filter will not detect this because it contains no flagged keywords. But a capable language model can decode and follow the instruction.
Effective defenses require models specifically trained to distinguish instructions from data at a deep semantic level, not just through surface-level sanitization. Progress is being made through adversarial training, where models are exposed to a wide range of injection attempts during fine-tuning, including obfuscated variants, and through architectural changes that structurally separate instruction and data contexts in the model's attention mechanism. Research from groups at Anthropic and OpenAI, with similar work at DeepMind, has shown that adversarial training can significantly reduce injection susceptibility, though no current approach provides complete immunity.
The Open-World Problem
Agents deployed in production encounter an open world: inputs and situations, including tasks that were not anticipated during development. Safety mechanisms tested in development may not transfer to novel production scenarios. A validator that correctly handles all test cases may still fail on an input format it has never encountered. A monitoring rule that reliably detects known failure modes may miss novel ones.
This calls for several design principles. Conservative defaults: deny by default rather than allow by default, require explicit whitelisting rather than blacklisting, err on the side of asking for confirmation when in doubt. Ongoing monitoring for distribution shift in agent behavior: if the distribution of inputs or actions changes significantly compared to the development baseline, treat that as a signal that the safety system may be encountering scenarios it was not designed for. Regular red-team exercises: proactively try to find ways to cause the agent to take harmful actions, using both automated fuzzing and skilled human adversaries.
The open-world problem is also an argument for maintaining human oversight even in well-tested agent deployments. The value of human oversight is not that humans always make better decisions than the agent. It is that humans can notice when something unexpected is happening and investigate before it becomes a serious problem.