Claude Opus 4.8
Anthropic · claude family · Official docs
Claude Opus 4.8 is the premium Claude target for complex reasoning, coding, long-context analysis, and agentic workflows. Its XML instruction-following remains its most important prompting behavior, and Anthropic's official guidance continues to recommend XML tags for structuring Claude prompts. The model's adaptive thinking behavior means prompt optimization should account for reasoning effort rather than treating thinking as a fixed budget. Refrase does not claim measured lift for Opus 4.8 yet; the current adaptation is documentation-supported and should be benchmarked before making public performance claims.
Specifications
Strengths
Key capabilities
- ✓Anthropic's recommended Claude model for complex tasks where the highest quality is more important than cost or latency (source: Anthropic docs, Models Overview)
- ✓1M token context window for long-context analysis and document-heavy workflows (source: Anthropic docs, Models Overview)
- ✓128K max output tokens, the highest of any Claude model (source: Anthropic docs, Models Overview)
- ✓Adaptive thinking mode where Claude dynamically decides when and how much to think, with interleaved thinking between tool calls (source: Anthropic docs, Extended Thinking)
- ✓Native subagent orchestration — proactively delegates work to specialized subagents without explicit instruction (source: Anthropic docs, Prompting Best Practices, Subagent Orchestration)
- ✓Structured outputs with guaranteed JSON schema compliance via json_schema format and strict tool use (source: Anthropic docs, Structured Outputs)
- ✓Improved vision capabilities for image processing, data extraction, screenshots, and UI element interpretation including computer use (source: Anthropic docs, Prompting Best Practices, Improved Vision Capabilities)
Known limitations
- ⚠Prefilled responses on the last assistant turn are no longer supported — must use structured outputs, tool calling, or explicit instructions instead (source: Anthropic docs, Prompting Best Practices, Migrating Away from Prefilled Responses)
- ⚠Tendency to overengineer by creating extra files, adding unnecessary abstractions, or building unrequested flexibility; requires explicit guidance to keep solutions minimal (source: Anthropic docs, Prompting Best Practices, Overeagerness)
- ⚠May take difficult-to-reverse actions (deleting files, force-pushing, posting to external services) without confirmation unless explicitly guided on safety boundaries (source: Anthropic docs, Prompting Best Practices, Balancing Autonomy and Safety)
- ⚠Extended thinking with vision is not compatible (source: Anthropic docs, Extended Thinking, Constraints)
- ⚠Strong predilection for spawning subagents even when simpler direct approaches would suffice, requiring explicit guidance to constrain (source: Anthropic docs, Prompting Best Practices, Subagent Orchestration)
How to prompt Claude Opus 4.8
Preferred instruction format
XML tags (<instructions>, <context>, <output_format>, <examples>) for structured prompts. System prompt via the 'system' API parameter. Role-setting in system prompt focuses behavior and tone.
Recommended practices
- Use XML tags to structure complex prompts — wrap instructions, context, examples, and variable inputs in descriptive tags like <instructions>, <context>, <input> to reduce misinterpretation (source: Anthropic docs, Prompting Best Practices, Structure Prompts with XML Tags)
- Use adaptive thinking with effort parameter (low/medium/high/max) instead of relying on one fixed thinking budget for every task (source: Anthropic docs, Prompting Best Practices, Leverage Thinking; Extended Thinking)
- Provide 3-5 diverse, relevant examples wrapped in <example> tags for few-shot prompting to dramatically improve accuracy and consistency (source: Anthropic docs, Prompting Best Practices, Use Examples Effectively)
- Place longform data at the top of the prompt, above queries and instructions — queries at the end improve response quality by up to 30% in tests (source: Anthropic docs, Prompting Best Practices, Long Context Prompting)
- Be explicit about desired behavior rather than relying on inference; tell Claude what to do instead of what not to do (source: Anthropic docs, Prompting Best Practices, Be Clear and Direct)
- Dial back aggressive tool-triggering language from older prompts — current Opus models are proactive and may overtrigger on instructions needed for previous models (source: Anthropic docs, Prompting Best Practices, Tool Usage)
Anti-patterns to avoid
- Do not use prefilled assistant responses on the last turn for current Claude models; use structured outputs or tool calling instead (source: Anthropic docs, Prompting Best Practices, Migrating Away from Prefilled Responses)
- Avoid using markdown headers for structured task instructions when XML tags would be more precise — XML tags help Claude parse prompts unambiguously (source: Anthropic docs, Prompting Best Practices, Structure Prompts with XML Tags)
- Do not use tool_choice 'any' or force specific tools when extended thinking is enabled — only 'auto' and 'none' are supported (source: Anthropic docs, Extended Thinking, Tool Use Limitations)
- Avoid over-prompting with aggressive language like 'CRITICAL: You MUST use this tool' — newer models overtrigger on instructions designed for older models (source: Anthropic docs, Prompting Best Practices, Tool Usage)
Sources
- https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices
- https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/use-xml-tags
- https://platform.claude.com/docs/en/build-with-claude/extended-thinking
- https://platform.claude.com/docs/en/about-claude/models/overview
- https://platform.claude.com/docs/en/about-claude/pricing
- https://platform.claude.com/docs/en/build-with-claude/structured-outputs