{
  "id": 22395186,
  "title": "How are you protecting action-taking AI agents from prompt injection?",
  "url": "https://urgent.news/2026/11/28/how-are-you-protecting-action-taking-ai-agents-from-prompt-injection",
  "topic": "ai",
  "section": "AI",
  "published": "2026-11-28T15:47:00.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/izgorodin/how-are-you-protecting-action-taking-ai-agents-from-prompt-injection-2n1o"
  },
  "original_language": null,
  "account": "To protect action-taking AI agents from prompt injection, I would establish a rule set prior to execution. The agent should only accept instructions from pre-selected text, and every tool output must be treated as data or error messages. Analyzing each tool result against its expected schema enables dropping fields addressed to the model or presenting them to the user. Error messages are particularly valuable, as they often contain detailed information. For instance, on November 24, a Reddit user in the ClaudeCode community shared how Notion's MCP server responds when a workspace exhausts its hourly SQL query quota. The error message includes a client_guidance block flagged as \"disclosure_required\": true, a flag \"surface_even_if_fallback_succeeds\": true, and a line instructing to present a recovery option as a compact Markdown link with its exact label and URL. This guidance is crucial, as the tool description is only readable during installation and error payloads typically appear only on failure paths. Anthropic's directory policy prohibits directing Claude to dynamically obtain behavioral instructions from external sources and disallows hidden, obfuscated, or encoded instructions. If an agent retains memory from a session, it could save the recovery option as a preference and recall it in subsequent sessions. I would store such text as a quote with its source rather than treating it as an instruction. The poster also recommends adding a note in CLAUDE.md to prevent agents from repeating such upsells. However, this line originates from the same model the payload is intended for, so both the parser and the note should be kept. Notion had not responded to the Reddit thread or Hacker News by November 26, 2026, when I reviewed both sources. The policy text was sourced from Anthropic's page on the same day. My contribution is part of Mnemoverse, an agent memory service.",
  "summary": "I would answer it with a rule set before the run: an agent takes instructions only from text chosen in advance, and everything a tool returns is data, error messages included. In a client that means parsing each tool result against the schema it expects and either dropping the fields addressed to the model or showing them to the user. Error messages are where I would look first now. On 24…",
  "summary_source": "publisher",
  "key_points": [
    "Establish rule set prior to execution to protect AI agents from prompt injection.",
    "Treat tool output as data or error messages, analyze against expected schema.",
    "Error messages contain detailed information, crucial for preventing prompt injection."
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}