Skip to content

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

cs.CR

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