[BUG] WebFetch fails to extract article content from WordPress Cocoon theme sites (returns only CSS)
Resolved 💬 4 comments Opened Jan 22, 2026 by ImpactCrater Closed Feb 28, 2026
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
WebFetch tool fails to extract article body content from WordPress sites using the Cocoon theme.
Instead of returning the article text, it returns only CSS stylesheet content from the <head> section, reporting that article content was not found.
What Should Happen?
WebFetch should correctly parse the HTML and return the article body content (text inside <article> or <main> tags), not the CSS stylesheets.
Error Messages/Logs
No error is thrown.
WebFetch returns successfully but with incorrect content:
"The page contains only CSS stylesheet code and WordPress theme configuration. The actual article text/body content is not present in the HTML provided."
Steps to Reproduce
- Open Claude Code in VS Code
- Use WebFetch to fetch any article from a WordPress site using Cocoon theme:
- https://widedeepspace.net/2026/01/22/2104/
- https://wp-cocoon.com/site-speed-up/
- https://www.mgo-tec.com/blog-entry-wordpress-cocoon01.html
- Observe that the response contains only CSS definitions, not the article text
- For comparison, fetch from a non-Cocoon site (e.g., https://gigazine.net/) - this works correctly
Claude Model
Opus
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.15
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
VS Code integrated terminal
Additional Information
Key Observations
- Claude.ai's web_fetch works correctly on the same URLs - it successfully extracts article content.
- Non-Cocoon WordPress sites work fine:
- nelog.jp (using Simplicity2 theme) - content extracted correctly
- webst8.com - content extracted correctly
- HTML structure is valid:
- Downloaded and inspected the HTML source
- <article> tag appears at line 216 with proper content
- JavaScript disabled test confirms content is server-side rendered (not JS-dependent)
- Suspected cause:
- Cocoon theme outputs large inline CSS in <head> (global-styles-inline-css)
- The CSS block is very long (lines 87-91 contain thousands of characters)
- WebFetch's HTML parser may be misidentifying this CSS as the main content
Impact
Cocoon is one of the most popular free WordPress themes in Japan.
This bug prevents Claude Code from reading a significant portion of Japanese blog content.
Workaround
- Use Claude.ai's web_fetch instead
- Download HTML locally and use Read tool
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗