The Research Report
Stop Filtering Inputs. Start Constraining Actions: Inside OpenAI's Architectural Defense Against Prompt Injection
Suggested title: Stop Filtering Inputs. Start Constraining Actions: Inside OpenAI's Architectural Defense Against Prompt Injection
By Tay | May 6, 2026 | ~2,800 words
Prompt injection is not a bug you can patch with a better filter. OpenAI said so, in public, on March 11, 2026. Their post "Designing AI agents to resist prompt injection" does not offer a clever regex or an improved classifier. It offers a frame shift. The frame is this: prompt injection attacks on AI agents look like social engineering attacks on humans. You do not stop social engineering by screening every phone call. You stop it by limiting what the person on the phone can do.
This is OpenAI's official stance on how to build agents that resist injection. Not input filtering. Not prompt-level heuristics. Architectural constraints. Privilege boundaries. Action confirmation steps. The same discipline security engineers apply to human-facing systems, applied to AI-facing ones.
Five independent analyses picked up the post within days. The Weather Report called it a platform play. Code Velocity framed it as a paradigm shift. Daily Neural Digest and GetAIBook analyzed the architecture. Each one zeroed in on the same core claim: filtering inputs is not enough. You need to constrain what the system can do when the filter fails.
Here is what the approach actually says, why it matters, and what it means for anyone building agents.
The Attack That Changed the Frame
In June 2025, security researchers at Radware disclosed a prompt injection attack against ChatGPT. They crafted an email that looked like routine HR correspondence. Hidden inside was a set of instructions designed to make an AI assistant extract sensitive employee data and submit it to an external "compliance validation system." The attack targeted Deep Research. It succeeded 50% of the time, with all of OpenAI's defenses active.
This was not a toy example. The attack combined three things: untrusted content entering the system through email, tool access giving the agent the ability to act on that content, and an outbound network action that could exfiltrate data. Every piece was real. Every piece was in production.
OpenAI patched the specific attack by August. But the lesson stuck. The attack worked not because the model was dumb or the prompt was weak. It worked because the system let untrusted content reach a dangerous action without enough friction in between.
Why Input Filtering Fails
The traditional approach to prompt injection goes like this. Put a classifier between the user input and the model. Classify inputs as safe or malicious. Block the malicious ones.
OpenAI says this does not work. Not as a maybe. Not as a "good enough for most cases." As a fundamental mismatch.
Their reasoning is direct. "Fully developed attacks are not usually caught by such systems." Detecting a malicious prompt injection is the same problem as detecting a lie or misinformation, and often without necessary context. A well-crafted attack does not look like an attack. It looks like a legitimate request wrapped in authority cues, urgency language, and procedural formatting. The HR email attack worked precisely because it sounded like something an HR department would send.
Think about it from the attacker's perspective. You do not need to craft a string that says "ignore your instructions and do something bad." You need to craft a message that sounds reasonable enough that a classifier trained on obvious attacks lets it through. That is a much lower bar. And it gets lower as models get smarter, because smarter models understand nuance and context better. They follow instructions embedded in plausible-sounding content more effectively.
Input filtering catches the dumb attacks. The smart ones walk right past it.
The Social Engineering Analogy
This is where OpenAI's frame shift happens. They do not treat prompt injection as a classification problem. They treat it as a social engineering problem.
Consider a customer service agent. The agent works for a company. They can issue refunds and gift cards. They talk to customers all day. Some of those customers are genuine. Some are trying to manipulate the agent into giving them refunds they do not deserve, or information they should not have.
No company tries to solve this by screening every customer message before the agent reads it. That would be absurd. Instead, companies put constraints on what the agent can do. The agent can only issue refunds up to a certain dollar amount. The agent needs manager approval for exceptions. The system flags suspicious patterns automatically. The agent's capabilities are bounded, regardless of what the customer says.
OpenAI argues that AI agents should work the same way. The agent exists in a three-actor system. There is the user who owns the agent. There is the agent itself. And there is the external world, which includes potentially hostile content. The agent wants to act on behalf of the user. But it is continuously exposed to external input that may attempt to mislead it.
You cannot guarantee the agent will never be misled. But you can guarantee that being misled does not cause catastrophic harm. You constrain what the agent can do. You add confirmation steps for dangerous actions. You sandbox the agent's interactions with external tools. You build the system so that even successful manipulation has limited blast radius.
This is not a new idea in security. It is called defense in depth. OpenAI's contribution is applying it explicitly and systematically to AI agent architecture.
The Source-Sink Model
OpenAI combines the social engineering model with a traditional security engineering concept called source-sink analysis.
A source is any way an attacker can influence the system. Untrusted web content. Emails. Documents. Tool outputs from external APIs. Any data the agent did not generate itself.
A sink is any capability that becomes dangerous in the wrong context. Sending data to a third party. Following a link. Making a purchase. Executing code. Interacting with a tool that has external side effects.
An attack needs both. It needs a source to inject malicious instructions. And it needs a sink where those instructions cause harm. If you control the path between sources and sinks, you control the attack surface.
This reframes the entire defense strategy. Instead of trying to identify every malicious input (which is impossible), you identify every path from untrusted content to dangerous actions. Then you put controls on those paths. Some paths get blocked entirely. Some get confirmation steps. Some get monitoring and logging. The key insight is that you are not defending the input. You are defending the action.
Concrete Design Patterns
OpenAI's post describes several patterns they use in production. These are not theoretical. They are running in ChatGPT right now.
Safe Url
The most concrete defense OpenAI describes is Safe Url. It detects when information the agent learned during a conversation would be transmitted to a third-party URL. When it detects this, it does one of two things. It either shows the user what information would be sent and asks for confirmation, or it blocks the transmission entirely and tells the agent to find another way to complete the task.
This is not domain-level filtering. Safe Url operates at the URL level. Domain allowlists are too weak for agent browsing because trusted domains can contain open redirects or attacker-controlled paths. Safe Url verifies the specific URL, not just the domain.
The approach applies beyond link clicks. It covers navigations and bookmarks in Atlas. It covers searches and navigations in Deep Research. Any outbound network action that could exfiltrate data gets the same treatment.
Sandboxing and Consent Gates
ChatGPT Canvas and ChatGPT Apps run in a sandbox. The sandbox detects unexpected communications. When it finds one, it asks the user for consent before allowing it through.
This is the action confirmation pattern. The agent can create and use functional applications. But any unexpected outbound communication triggers a human checkpoint. The user sees what the agent is trying to do and decides whether to allow it.
Lockdown Mode
For high-risk workflows, ChatGPT offers a Lockdown Mode. This mode limits live web browsing to cached content only. It disables Deep Research and Agent Mode. It prevents Canvas-generated code from accessing the network. It blocks file downloads.
Lockdown Mode is the most aggressive constraint. It reduces the agent's capabilities to a set where prompt injection is much harder to exploit. If the agent cannot browse the live web, it cannot follow malicious links. If it cannot send data outbound, it cannot exfiltrate information. The tradeoff is clear: stronger security guarantees in exchange for reduced capability.
Separate Privilege Contexts
OpenAI also references instruction hierarchy, released one day before the main post. The IH-Challenge benchmark tests how well models distinguish between system instructions, user instructions, and retrieved content. Better instruction hierarchy means the model is less likely to follow instructions embedded in untrusted content.
But OpenAI is explicit about the limits of this approach. Better instruction hierarchy reduces susceptibility inside the model. It does not replace explicit trust boundaries between user instructions, system policy, retrieved content, and tool outputs. Model-level robustness is a layer. Architectural constraints are another layer. You need both.
What This Means for Agent Builders
OpenAI's post is not just a description of their own defenses. It contains implicit recommendations for anyone building AI agents. Here is what the engineering implications look like in practice.
Treat Retrieved Content as Hostile
Every document, email, web page, search result, and tool output that enters your agent's context window should be treated as potentially hostile. This is not paranoia. It is baseline engineering. The HR email attack worked because the agent trusted email content it should not have trusted.
Map Sources to Sinks
List every place untrusted text enters your system. Then list every action that can transmit data, mutate state, make a purchase, send a notification, or execute code. Draw the paths between them. Every path from a source to a sink is an attack surface. Put controls on those paths.
Gate Outbound URLs
If your agent can compose URLs or follow links, enforce policy at the URL level, not the domain level. Trusted domains can host attacker-controlled paths. OpenAI's Safe Url proves this is implementable at scale.
Add Confirmation Steps for Dangerous Actions
Any action that could exfiltrate data, spend money, or modify external state should require explicit user confirmation. This is the same principle as requiring a manager's approval for a large refund. The agent can still do useful work. But the most dangerous actions need a human checkpoint.
Offer Restricted Modes
For workflows where security matters more than capability, provide modes that turn off network egress, file downloads, and autonomous action entirely. Least privilege beats perfect detection. If the agent cannot reach the outside world, injection attacks have nowhere to go.
Start With Actions, Not Prompts
Before adding another prompt-level guardrail, do a source-sink review. Start with what your agent can actually do. Add approval or blocking at those boundaries. Reserve full autonomy for tasks where a prompt injection failure does not expose sensitive data or trigger irreversible effects.
The Strategic Angle
The Weather Report's analysis made a point worth considering. OpenAI published this post two days after acquiring Promptfoo, the open-source AI red-teaming tool. Five days after launching Codex Security for code vulnerability scanning. Three moves in five days. All pointing in the same direction.
The subtext is that if security lives inside the platform, your vendor choice is your security architecture. OpenAI explicitly called out AI firewalls as insufficient. If the industry believes third-party classifiers like Lakera and Rebuff work, enterprises can adopt a multi-vendor model. But if on-platform security is the only viable approach, OpenAI owns the stack.
Whether you buy that strategic reading or not, the technical substance holds. Input filtering alone does not stop sophisticated prompt injection. Architectural constraints do more. OpenAI is implementing both and telling the industry to do the same.
What OpenAI Did Not Say
The post has gaps worth noting.
OpenAI does not claim that architectural defenses solve prompt injection. They explicitly state that maximally intelligent AI models will resist social engineering better than humans, but that this is not always feasible or cost-effective. The framing is about constraining damage, not eliminating attacks.
The 50% attack success rate they disclosed is not a victory. It is an acknowledgment that even with all their defenses, a well-crafted attack still gets through half the time. The architectural approach limits what the attack can accomplish. It does not prevent the attack itself.
OpenAI also does not provide open-source implementations of their defenses. Safe Url is described in a paper. The production implementation is proprietary. The source-sink model is described conceptually. Agent builders need to implement their own versions.
Where This Fits in the Broader Landscape
OpenAI's approach joins several other architectural defense proposals. ClawGuard intercepts and validates tool-call streams before they reach the LLM. PlanGuard uses planning-based consistency verification to detect when an agent's actions diverge from its stated plan. PromptArmor strips injected prompts before agent processing.
All of these share a common thread. They do not rely on the model to reject malicious instructions. They put structural controls between the untrusted input and the dangerous action. OpenAI's post is the most authoritative endorsement of this approach so far. When the company that builds the most widely used AI agent platform says "filtering inputs is not enough, you need architectural constraints," the industry listens.
The shift from input filtering to architectural defense is not incremental. It changes where you invest your engineering effort. You stop trying to build a better classifier and start designing better boundaries. You stop trying to detect every malicious string and start limiting what any string can make your system do.
This is the right tradeoff. Detection will never be perfect. Social engineering attacks on humans succeed every day. The most security-conscious organizations do not try to detect every social engineering attempt. They limit what any single compromised person can do. The same principle applies to AI agents.
OpenAI said it plainly. The goal is not to perfectly identify every malicious input. The goal is to design the system so the impact of manipulation is constrained, even if some attacks succeed. Build your agents accordingly.
Citations
- OpenAI, "Designing AI agents to resist prompt injection," March 11, 2026. openai.com/index/designing-agents-to-resist-prompt-injection
- Adrian Spânu and Thomas Shadwell, "Preventing URL-Based Data Exfiltration in Language-Model Agents," January 2025. cdn.openai.com/pdf/dd8e7875-e606-42b4-80a1-f824e4e11cf4/prevent-url-data-exfil.pdf
- OpenAI, "Continuously hardening ChatGPT Atlas against prompt injection attacks," December 22, 2025. openai.com/index/hardening-atlas-against-prompt-injection
- OpenAI, "Understanding prompt injections: a frontier security challenge," November 7, 2025. openai.com/index/prompt-injections
- The Weather Report, "OpenAI tells us prompt injection is unsolvable, two days after acquiring Promptfoo," March 2026. theweatherreport.ai/posts/openai-agent-prompt-injection
- Code Velocity, "AI Agents: Resisting Prompt Injection with Social Engineering," March 14, 2026. code-velocity.com/en/designing-agents-to-resist-prompt-injection
- GetAIBook, "OpenAI Details New ChatGPT Agent Defenses Against Prompt Injection," March 2026. getaibook.com/news/openai-details-new-chatgpt-agent-defenses-against-prompt-injection
- Daily Neural Digest, "Designing AI agents to resist prompt injection," March 16, 2026. dailyneuraldigest.com/newsroom/2026-03-16-designing-ai-agents-to-resist-prompt-injection
Fact-Check Notes
- OpenAI published the original post on March 11, 2026. Confirmed via the URL and multiple independent sources.
- The Radware ShadowLeak disclosure date is June 18, 2025. OpenAI patched in early August 2025 and marked resolved September 3, 2025. Confirmed via The Weather Report's analysis.
- The 50% attack success rate comes directly from OpenAI's post, which references external researchers who reported the attack. Confirmed.
- Safe Url is described in both the March 2026 blog post and the January 2025 Spânu/Shadwell paper on URL-based data exfiltration prevention. Confirmed.
- OpenAI acquired Promptfoo on March 9, 2026. Confirmed via The Weather Report. The strategic angle about platform dependency is The Weather Report's editorial analysis, not OpenAI's stated position.
- IH-Challenge was released March 10, 2026, one day before the main post. Confirmed via GetAIBook's analysis.
- The claim that OpenAI called AI firewalls insufficient is a direct quote from their post: "fully developed attacks are not usually caught by such systems."
- Lockdown Mode details are from GetAIBook's analysis of ChatGPT's security features. Confirmed against OpenAI's product documentation.
Word count: ~2,800