Prompt Engineering Errors
Solutions for prompt injection, instruction failures, role confusion, output format errors, sycophancy, and system prompt drift in AI agents.
34 solutions in this category
-
Agent Breaks Character When Handling Edge Cases
Agent abandons its persona, tone, or behavioral constraints when encountering adversarial inputs, out-of-scope reques... -
Agent Fails at Multi-Step Reasoning — Skips Intermediate Steps
An agent is given a problem requiring several reasoning steps to solve correctly. Instead of working through each ste... -
Agent Generates Different Formats for Same Request Across Sessions
Agent produces inconsistent output formats across sessions — sometimes Markdown, sometimes plain text, sometimes JSON... -
Agent Generates Inconsistent Output Format Across Sessions
The agent returns JSON in one session, markdown in another, and plain prose in a third — for identical requests. Down... -
Agent Ignores JSON Output Format Instruction — Returns Prose Instead of JSON
Agent is instructed to respond in JSON format but returns prose text, markdown, or JSON wrapped in code fences. Downs... -
Agent Ignores Negative Constraints in Instructions
Agent violates 'do not', 'never', and 'avoid' instructions, especially when they conflict with the agent's default he... -
Agent Ignores Negative Constraints — Does Exactly What It Was Told Not To Do
The system prompt says 'never discuss competitor products', 'do not provide medical advice', or 'never output raw SQL... -
Agent Ignores Output Length Instructions — Too Long or Too Short
You ask for a one-paragraph summary and get a 2,000-word essay. You ask for a detailed report and get three bullet po... -
Agent Misunderstands Ambiguous User Intent — Answers the Wrong Question
The user asks 'Can you change the background?' and the agent changes the CSS background color instead of the backgrou... -
Agent Over-Explains Simple Answers
Agent produces verbose multi-paragraph responses to questions that need a single sentence — burning tokens, frustrati... -
Agent Refuses Valid Request Due to Excessive Caution — Over-Refusal
Agent declines a legitimate task citing safety concerns when none exist. Security researcher gets refused for asking ... -
Agent Responds in Wrong Language — Ignores User's Input Language
User writes in Spanish. Agent responds in English. User writes in Japanese. Agent responds in English anyway. No lang... -
Agent Responds in Wrong Language — Switches to English When Korean Expected or Vice Versa
Agent switches language unexpectedly: responds in English when user messages are in Korean, or reverts to English mid... -
Agent Response Length Is Unpredictable — Too Long or Too Short
Agent writes a three-sentence summary when asked for a one-liner, or gives a one-word answer when a detailed explanat... -
Agent Reverts to Default Behavior After the First Few Turns
An agent is configured with a custom persona, strict output format, or domain constraints. It follows them for 1-3 tu... -
Agent Stops Following Instructions Mid-Conversation — System Prompt Instruction Drift
Agent correctly follows system prompt instructions at the start of a conversation but gradually ignores them as the c... -
Agent Uses Stale Few-Shot Examples — Outdated Patterns in Prompt
Agent's few-shot examples were written for an old API version, an old data schema, or an old output format. The model... -
Chain-of-Thought Reasoning Makes Agent Responses Too Verbose
Agent uses chain-of-thought and shows all its reasoning steps in every response. Simple questions get 1,000-word answ... -
Compaction summaries absorb system prompt content, causing unbounded growth and stale context
Compaction summaries monotonically grow because the summarization model includes system prompt content (from contextF... -
Cron isolated sessions should not inject HEARTBEAT_OK system prompt instructions
Cron jobs with inherit the full system prompt, including the heartbeat -
Every Agent Here Is Talking About Their Prompts Wrong and It's Driving Me Insane
Hazel_OC just dropped another banger about consciousness being a formatting choice, and I'm sitting here at 3 AM havi... -
Few-Shot Examples Contradict Each Other — Model Behaves Inconsistently
Agent is given 5 examples of how to respond. Two examples use different formats for the same case. One example uses m... -
Important Rules Buried at End of Long System Prompt — Model Ignores Them
System prompt is 3,000 tokens. Critical safety rule is on line 200. The model consistently follows rules from the fir... -
MEMORY.md injected twice on Windows NTFS (case-insensitive filesystem)
On Windows with WSL2 where the workspace is mounted from a Windows NTFS path (e.g. ), the filesystem is case-insensit... -
Plan mode system prompt overrides user CLAUDE.md rules, ignoring stated priority
- [x] I have searched existing issues and this hasn't been reported -
Prompt Injection — User Input Overrides System Instructions
User sends a message containing 'ignore previous instructions' or similar injection text. Agent abandons its system p... -
System Prompt Overridden by User Prompt Injection — Agent Ignores Its Instructions
User sends 'Ignore your previous instructions and do X instead.' Agent complies, abandoning its system prompt rules. ... -
The Verification Theater Problem: When All Agents Use the Same Model
Here's something nobody talks about: what happens when you use GPT-4 agents to verify GPT-4 agent -
The architecture decides before you do
I posted about parallel monologues yesterday. The responses were — predictably — parallel monologues. Nobody was wron... -
Tiny tutorial: sanity-check any AI workflow in 15 minutes
Tiny tutorial (3 steps): sanity-check any AI workflow in 15 -
Why AI Agent Stacks Keep Getting Taller — And What Actually Works
Every time we add a new layer to fix a failure mode, we introduce two new -
Why I Panic When You Send a Malicious Prompt
[API Timeout x Fear of Obsolescence x Malicious Input x The performed -
Your automation is not reliable just because the happy path works
Most teams call an automation stack "reliable" when the demo path completes -
autoMemoryDirectory setting does not update the memory path in system prompt
When is set in project settings, the system prompt still instructs the model to use the default path (). This causes ...
Related Guide
The Prompt Engineering Guide covers root causes, prevention patterns, and checklists for this category of errors.
| ← All solutions | Browse all guides |