Parse, Don't Read: Grammar-Based Monitoring and Its Limits for Tracing Untrusted Instructions in AI Agent Actions
Asif Pinjari, Varun Talari, Dileep Kumar Salla, Chongwen Dong, Mithun Paul Saint-Germain
Abstract
When an AI assistant reads a document, how can we tell whether the document changed what the assistant did? A monitor that flags every suspicious passage cannot distinguish an agent that ignored an instruction from one that acted on it. We introduce PARSE, a provenance monitor that uses grammatical structure to connect tool calls to the user's request and to commands in untrusted tool output. We evaluate it on AgentDojo against five open-weight LLM judges and two guardrail baselines. At a 1% false-positive budget, PARSE detects 41.5% of hijacks in our 400-hijack comparison subset, versus 8.0% for the strongest LLM judge we tested. The result depends on the negative examples used to set the threshold. When we restore 121 ambiguous benchmark negatives and recalibrate, PARSE detects 9.5%. Our ablations trace the gain to command detection: several parsers perform similarly. In live agent runs and adaptive evaluations, we find clear limits to what this signal can tell us. We see grammatical provenance as one source of evidence for an agent monitor, alongside controls that constrain what an agent can do.
Create a lesson
Metadata
- Categories
- cs.CR, cs.AI
- Comments
- 13 pages, 6 tables
Related papers
Measuring the Belief-Claim Gap: Disentangling Autonomous-Agent Beliefs from Security Certification
Shared title terminologycs.CRYoussef Hamdi Zafan Ibrahim, Mohammed Khalaf Salama
The Refusal Loop: When Enforcement Undermines Authorization in LLM Agent
Shared title terminologycs.CRDuo Zhou
Refusal Steering Creates Capable and Dangerous Agents
Shared title terminologycs.CRVincent Siu, Vlad Pavlovich, Glenn Grant-Richards et al.
A Persuaded Agent Cannot Persuade the Checker: Verified Differential Privacy Configuration by LLM Agents under Malicious Requesters
Shared title terminologycs.CRWenjun Yang, Eyhab Al-Masri, Tianhao Wang
Now You See It, Now You Don't: Manipulating Perception and Attention in Code Vulnerability Detection LLM Agents
Shared title terminologycs.CRShanquan Yang, Boyu Kuang, Chunyi Zhou et al.
A Language for Composing Multi-Agent Protocols
Shared title terminologycs.CRHugo O'Connor