Claude Code Deep Dive: The Unreasonable Effectiveness of HTML in Agentic Workflows
Event Core
Recent evaluations of Claude Code—Anthropic’s CLI-based AI developer tool—have highlighted a surprising phenomenon: the “unreasonable effectiveness” of HTML. While the industry has gravitated toward JSON and Markdown for structured data, Claude demonstrates a superior cognitive grasp of HTML, utilizing it to navigate complex codebases and UI logic with unprecedented precision.
- ▶ Web-Native Intuition: Due to the massive prevalence of web-crawled data in training sets, LLMs possess a “native” fluency in HTML’s semantic structures that often surpasses their handling of abstract data formats.
- ▶ Semantic Density: HTML tags provide implicit hierarchical and functional context, allowing models to “anchor” their reasoning more effectively than with flat text or verbose JSON schemas.
- ▶ Agentic Performance: Claude Code leverages this structural advantage to minimize hallucinations during complex refactoring and UI-driven automation tasks.
Bagua Insight
The tech world often suffers from a “newness bias,” assuming that modern formats like JSON are inherently better for AI communication. However, Claude Code’s performance suggests that training data distribution is destiny. Because the internet was built on HTML, it serves as the most comprehensive “knowledge map” for LLMs. When we use HTML as a medium for RAG or agentic orchestration, we aren’t just passing data; we are speaking the model’s primary language. This realization shifts the focus from creating new DSLs to optimizing how we leverage legacy web structures to reduce entropy in model reasoning. HTML is no longer just for browsers; it is a high-bandwidth interface for machine intelligence.
Actionable Advice
Engineers building agentic workflows should experiment with using semantic HTML as an intermediate representation instead of JSON, especially for tasks involving document structure or UI manipulation. When designing prompts for Claude, lean into HTML-like tagging to define boundaries and hierarchies. Furthermore, when preparing datasets for fine-tuning or RAG, preserving the semantic integrity of HTML rather than stripping it to plain text may yield significant gains in model accuracy and spatial reasoning.