[DOCS] WebFetch docs missing large-HTML truncation behavior

Open 💬 3 comments Opened Apr 22, 2026 by coygeek

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/tools-reference

Section/Topic

WebFetch tool behavior and limitations

Current Documentation

The docs currently say:

WebFetch — Fetches content from a specified URL

The Agent SDK references are similarly generic:

Fetches content from a URL and processes it with an AI model.

And the Python Agent SDK only documents the basic input/output shape:

{"url": str, "prompt": str} {"response": str, "url": str, "final_url": str | None, "status_code": int | None}

None of these pages mention that very large HTML pages may be truncated before HTML-to-markdown conversion.

What's Wrong or Missing?

Claude Code changelog v2.1.117 says:

Fixed WebFetch hanging on very large HTML pages by truncating input before HTML-to-markdown conversion

That change exposes user-visible behavior that is not documented anywhere in the Claude Code docs: when WebFetch receives a very large HTML page, Claude Code may truncate the raw HTML before converting it to markdown. Users who get incomplete fetch results from oversized pages currently have no official documentation explaining why content may be missing, that this is intentional, or that large monolithic HTML pages can behave differently from smaller pages.

Suggested Improvement

Add a short limitation note to the WebFetch documentation in the main tool reference, with matching notes in the Agent SDK references. The note should explain that:

  • very large HTML pages may be truncated before HTML-to-markdown conversion to prevent hangs
  • fetched output from oversized pages may therefore be partial
  • narrower, more targeted URLs are more reliable when users need complete page content

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/tools-reference | Main built-in tool reference for WebFetch |
| https://code.claude.com/docs/en/agent-sdk/typescript | TypeScript Agent SDK WebFetch input/output reference |
| https://code.claude.com/docs/en/agent-sdk/python | Python Agent SDK WebFetch input/output reference |
| https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-tool | Cross-reference: API web fetch docs already describe content limits/truncation for large fetched content |

Total scope: 4 pages affected

Source: Changelog v2.1.117

Exact changelog entry: Fixed WebFetch hanging on very large HTML pages by truncating input before HTML-to-markdown conversion

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗