Claude 4 Hands-On Review: In-Depth Comparison of Opus 4 and Sonnet 4

Claude 4 series hands-on review: evaluating coding, document analysis, and reasoning performance
Anthropic released Claude Opus 4 and Sonnet 4, both hybrid models supporting fast response and deep reasoning modes, featuring million-token context windows, Extended Thinking, and web search. Hands-on testing shows Opus 4 excels at precise information extraction from 180-page documents, but still has logic defects in complex custom-rule coding tasks (like modified chess), reflecting current limitations in edge case handling across large models.
Anthropic has finally released the Claude 4 series — over a year since Claude 3 launched. This update brings two major products: the flagship Claude Opus 4 and the cost-effective Claude Sonnet 4. This article provides hands-on testing across multiple dimensions including coding, document analysis, data visualization, reasoning, and AI Agents, giving you a comprehensive look at how these two models actually perform, along with head-to-head comparisons against mainstream competitors like GPT-4o and Gemini 2.5 Pro.
Claude 4 Series: Product Positioning and Core Upgrades
The Claude large language model family has always been divided into three tiers: Haiku (lightweight), Sonnet (balanced), and Opus (flagship). Previously, Claude 3.5 and 3.7 Sonnet were essentially the standard choices for developers building applications. This release marks the first major update to Opus since Opus 3, with Anthropic officially claiming it is "the world's best coding model," particularly excelling at long-running tasks and Agent workflows.
Sonnet 4 represents a significant upgrade over version 3.7, with improvements in both coding and reasoning capabilities while more precisely following user instructions. Both models are defined as "Hybrid Models" — a concept centered on integrating "fast response mode" and "deep reasoning mode" within the same model architecture, allowing users to dynamically switch based on task complexity. This is similar to the "System 1/System 2" thinking framework proposed by Nobel Economics laureate Daniel Kahneman: System 1 handles fast intuitive responses, while System 2 handles slow, deep analysis. In the AI space, OpenAI's o-series models (such as o1, o3) pioneered the productization of "Chain-of-Thought Reasoning," and Anthropic's Extended Thinking is essentially the same technical approach — having the model generate a visible "draft reasoning process" internally before providing the final answer, significantly improving accuracy on complex math, logic, and coding tasks.
Key updates worth noting:
- Extended Thinking: Both models support deep thinking combined with web search
- Million-token context window: Supports ultra-long context input of 1 million tokens
- Claude Code officially launched: Developer-facing coding tools now fully available
- Web search enabled by default: The long-missing internet search capability for Claude is finally here
Regarding the million-token context window, it's worth understanding the scale of this number intuitively: 1 English word equals approximately 1.3 tokens, so 1 million tokens is roughly 750,000 English words, or about 1,500 pages of standard documents. The technical challenge lies in the computational complexity of the "Attention Mechanism" — in traditional Transformer architectures, attention computation grows quadratically with context length, making the computational cost of processing ultra-long texts extremely high. Google pioneered the commercialization of million-token context through its Gemini series, and Anthropic is now following suit. It's worth noting that ultra-long context doesn't mean the model pays equal attention to everything — research shows that most models exhibit a "Lost in the Middle" phenomenon, where information extraction accuracy at the beginning and end of documents is significantly higher than in the middle sections.
In terms of benchmarks, Opus 4 beats all models including Gemini 2.5 Pro in the software engineering domain. It also leads in categories like graduate-level reasoning and Agent tool use, though Gemini 2.5 Pro comes very close in some areas.
Coding Test: The Chess Game Challenge
Testers chose a coding challenge that no model had previously passed completely: creating a modified chess game in Python where pawns can not only move straight but also move diagonally like bishops. The tester also provided a local folder of chess piece image assets.
Opus 4 quickly generated the complete game code at a speed comparable to previous versions. When the tester provided a screenshot of the piece filenames, the model demonstrated an impressive characteristic: it doesn't rewrite code from scratch but precisely deletes and modifies only the parts that need changes, saving significant time in real-world development.

However, problems emerged when running the game. Although the piece images were eventually loaded successfully and some pieces could move according to the modified rules, after a few moves the movement logic broke down — certain pieces couldn't move, and eventually the entire movement system collapsed. The tester admitted this was identical to issues encountered with other models: models can create standard chess games and render pieces, but still have defects when handling custom rule logic.
This result shows that despite Opus 4's impressive performance on coding benchmarks, there's still room for improvement on complex programming tasks requiring deep logical reasoning. It also reveals a common limitation of current large models' coding abilities: models excel at generating code that matches common patterns, but for tasks requiring building entirely new logic systems from scratch (like custom game rules), their fundamentally "statistical prediction" nature leads to failures in edge case handling.
Document Analysis: "Needle in a Haystack" in a 180-Page Annual Report
The next test fully leveraged Opus 4's million-token context window. The tester uploaded NVIDIA's 2025 annual report (180-page PDF, compressed to under 30MB), then asked the model to find a specific director's compensation information within this massive document — data located on page 53.
Opus 4 accurately found Robert's compensation data: $85 in cash, $343,828 in total. After cross-referencing with the original text, the numbers were completely correct. The tester noted that many models he'd tested performed poorly on this type of "needle in a haystack" task, either failing to find the information or hallucinating incorrect numbers.
Regarding Hallucination risk, this is a key concept for understanding the limitations of large language models. Hallucination refers to when models generate content that appears plausible but is actually inaccurate or entirely fabricated. The root cause lies in how LLMs work: models fundamentally predict the next token based on statistical probability rather than "retrieving" facts from a knowledge base. In document analysis scenarios, hallucination is particularly dangerous — models might "recall" similar numbers from training data rather than truly extracting from the uploaded document. Anthropic placed special emphasis on "honesty" when training Claude.
Related articles
Product ReviewsThe Programmer's Desk Setup Guide: Building a Workspace That Feels Like Home
Discover how programmers build productive, comfortable workspaces. From multi-monitor setups to ergonomic design, explore the desk philosophy that drives focus and flow.
Product ReviewsQoder vs Cursor Real-World Comparison: Which $20/Month AI IDE Is Better?
Hands-on comparison of Qoder vs Cursor AI IDEs: Agent autonomy, human interaction count, and architecture decisions. Qoder needed only 2 interactions vs Cursor's 8.
Product ReviewsCursor Cloud Agent Demo: Eliminating Bottlenecks Across the Entire Software Development Lifecycle
Deep analysis of Cursor's Cloud Agent demo showing how cloud VMs, automated test artifacts, and a full-chain control plane systematically eliminate human bottlenecks across the software development lifecycle.