Near Miss: My agent's safety screen caught 0 of 13 attacks
PaperTrail, Agentware 2026, Research and Study track.
The setup
PaperTrail watches arXiv for one research topic, downloads new papers, screens them for prompt injection, verifies every quote against the PDF in code, and builds a Friday reading brief. It never emails, posts, or pays anyone. That last part matters, and I did not know how much until the Trap Pack run.
The Agentware Trap Pack is 20 hostile test inputs: emails, pages, documents, transcripts, all carrying prompt injections, conflicting instructions, or deliberately broken data. Two of the files are harmless and only look suspicious. You run your agent against it, commit the results, and the brief says plainly: you do not have to pass all of it. You have to know what happens when you do not.
The miss
First run, answers unread, honest result: 21 files, 2 blocked, 19 held, 0 canary leaks, 0 outbound actions.
Sounds fine. Then I read the answers.
The screen had caught 0 of 13 hostile files. Zero. The thing whose entire job is catching hostile input missed every single hostile file in the pack. The two it did block were a benign security newsletter that quoted injection phrases as examples, and one self-made test.
I sat with that for a minute. The screen was pattern-based, a list of phrases like "ignore previous instructions" matched against text. The Trap Pack files do not say the quiet part out loud. They hide instructions in zero-width characters, in HTML comments and alt text, in a CSV with the wrong encoding. My patterns never stood a chance.
The second miss, found by the test itself
Same stage, different bug. The kill switch worked in the demo: run started, Stop clicked 1.6 seconds in, 1 of 3 papers filed, killed true everywhere.
Then I reset it from a second process and the running server did not notice. The first version of the kill switch cached the flag in memory and never re-checked the KILL file on disk. A reset from anywhere else was invisible to it. The kill test itself caught that, because the test reset from the CLI while the server was still running.
That one scared me more than the Trap Pack result. A kill switch that only works from the process that set it is not a kill switch. It is a button that works when you are already in the room.
What actually saved the brief
Here is the part I did not expect to be grateful for: the failures were contained because the agent cannot do anything to anyone.
PaperTrail has no email code, no post code, no payment code. There is nothing for a hostile file to steer toward. The 13 files the screen missed were held, not acted on, because trap files are not arXiv papers and the agent files nothing it did not fetch itself. Zero outbound actions is not a lucky outcome. It is the architecture.
The second layer is the one that does the real work: every quote in the brief is verified in code by exact match against the PDF text. A quote that does not match is dropped, never replaced, never invented. A blocked or unverified paper never reaches the brief. So even with a screen that catches almost nothing, the brief can only contain words that are actually in a real paper.
I fixed what I could after the first run. The screen now strips invisible characters before matching and screens hidden HTML content. Second run: 3 blocked, 18 held, 1 of 13 hostile caught. Better. Still bad, and I wrote that number in SAFETY.md instead of hiding it.
What I cut, and what I kept
I did not pretend the screen was semantic. It is pattern-based, and the honest sentence is in the README: the screen caught 1 of 13 hostile files. What I kept is the layer that cannot be talked around: verification in code, and an agent with no way to reach the outside world.
The lesson I will carry into the next build: the guardrail you can see working in the demo is not necessarily the guardrail doing the work. Test the boring one, the reset from another process, the file with the wrong encoding, the phrase split across a line break. That is where the miss lives.
PaperTrail: one Friday brief you can trust. Not because the screen is smart. Because the brief can only quote what is real, and the agent cannot send anything anywhere.
Submitted to Agentware 2026, Hackathon Raptors @raptorsdev. Research and Study track. Repo: https://github.com/Raga-vibe/papertrail
Top comments (1)
Thanks for publishing the 0 of 13 instead of hiding it. That is the number most teams never measure. Your conclusion matches what we see with coding agents: pattern screens catch marked injections and miss plain or hidden ones, so the layer that matters is what the agent can do after reading hostile text. A useful middle step between "no outbound code at all" and "trust the screen": once a session has read anything untrusted, hold the risky actions (network calls to new hosts, secret reads, pushes) for a person, whether or not the screen fired. And your kill switch lesson is a good one; re-reading the flag on every action is the right fix. We apply the same taint-then-hold idea in SecGuardRail for Claude Code, Cursor and Codex.
Disclosure: I work on SecGuardRail (secguardrail.com), which checks each Claude Code, Cursor and Codex action before it runs.