Prompt Injection Fixes Need Regression Tests
Stack Overflow Blog, Tuesday, November 24th, 2026
Engineers argue patched prompt injections should become regression tests that run whenever a model, prompt or connector changes.
The article argues that a prompt injection which returns after being patched is a regression, because agent behavior can shift through a model upgrade, prompt edit or new data connector without any code change.
A Salesforce engineer recounts a patched injection via a retrieval connector that returned after a model upgrade made the system more compliant with instructions in retrieved documents, and his team now turns every blocked attack into a test fixture and does not release builds that fail them.
A TestMu AI executive recommends zero-trust handling of agent-to-agent output, separate coverage for user-driven and external-data attacks, and testing across full sessions because of memory.
Security is said to own the bar while delivery teams own the release gate.