Claude Not Following Instructions — How to Fix It
Claude sometimes ignores specific formatting rules, skips parts of your prompt, or produces output that doesn't match what you asked for. This is one of the most common frustrations for both new and experienced Claude users. The good news is that a few simple prompt structure changes can dramatically improve instruction-following behavior.
Why does this error happen?
How to fix it
Use XML Tags to Structure Your Prompt
Wrap distinct sections of your prompt in descriptive XML tags such as <instructions>, <context>, and <task>. This creates clear boundaries that help Claude distinguish between background information and actionable directives. Claude is specifically trained to recognize and respect XML-style structure, making this one of the most effective techniques available.
Add Explicit Output Format Examples
Show Claude exactly what your expected output should look like by including a concrete example inside your prompt. For instance, if you want JSON output, paste a sample JSON block and label it as the desired format. Demonstrating the format is far more reliable than describing it in prose alone.
Use the System Prompt in the API for Persistent Instructions
If you are using the Claude API, move your formatting rules and behavioral instructions into the system prompt field rather than the human turn. The system prompt is given higher priority and persists across the conversation, making it ideal for constraints you want Claude to always follow. This prevents user messages from accidentally overriding your core instructions.
Break Complex Instructions into Numbered Steps
When you have multiple requirements, list them as a numbered or bulleted list rather than writing them as a paragraph. Numbered steps are easier for Claude to track and less likely to be partially skipped. Keep each instruction to a single, unambiguous action for best results.
💡 Pro Tip
Always place your most critical formatting or behavioral constraints at the very beginning of your prompt inside an <instructions> tag — Claude gives more weight to instructions that appear early and are visually separated from the rest of the content.
Frequently Asked Questions
Why does Claude follow instructions in short prompts but ignore them in long ones?
Does repeating instructions at the end of the prompt help?
Will Claude Pro follow instructions more reliably than the free version?
Can I force Claude to never break character or format during a long conversation?
Quick diagnostic checklist
Before diving into the full fix, run through these quick checks — they resolve the issue in most cases without additional steps:
Common root causes
Understanding why this error occurs helps you prevent it in the future. The most frequent causes are:
- Context window limits reached in long conversations
- API rate limits on free or paid tiers
- File format or size restrictions on uploads
- Anthropic service maintenance or outages
- Network connectivity issues between client and servers
Still not working?
If none of the steps above resolved the issue, the next step is to contact Claude support directly. When reaching out, include:
- • The exact error message or code you see
- • The steps you already tried from this guide
- • Your account plan and the approximate time the error started
- • Your browser/OS version if it is a web interface issue
About Claude
Claude is an AI assistant built by Anthropic, available as Claude 3.5 Sonnet, Claude 3 Opus, and Claude 3 Haiku. It is designed with a focus on safety, helpfulness, and honesty, and is widely used for writing, coding, analysis, and research. Claude is accessible via claude.ai and through the Anthropic API.
Browse all Claude error guides →