claude-code - 💡(How to fix) Fix [DOCS] WebFetch docs missing large-HTML truncation behavior [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#51783Fetched 2026-04-22 07:52:58
View on GitHub
Comments
0
Participants
1
Timeline
3
Reactions
0
Author
Participants
Timeline (top)
labeled ×3
RAW_BUFFERClick to expand / collapse

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:

PageContext
https://code.claude.com/docs/en/tools-referenceMain built-in tool reference for WebFetch
https://code.claude.com/docs/en/agent-sdk/typescriptTypeScript Agent SDK WebFetch input/output reference
https://code.claude.com/docs/en/agent-sdk/pythonPython Agent SDK WebFetch input/output reference
https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-fetch-toolCross-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

extent analysis

TL;DR

Add a limitation note to the WebFetch documentation explaining that very large HTML pages may be truncated before HTML-to-markdown conversion.

Guidance

  • Review the current documentation for WebFetch in the main tool reference and Agent SDK references to identify areas where the limitation note can be added.
  • Consider adding a note to the WebFetch documentation explaining that fetched output from oversized pages may be partial and that narrower, more targeted URLs are more reliable when complete page content is needed.
  • Verify that the added note is consistent across all affected pages, including the main tool reference and Agent SDK references for TypeScript and Python.
  • Check the cross-reference page on API web fetch docs to ensure that the content limits and truncation information is consistent with the updated WebFetch documentation.

Example

No code snippet is necessary for this issue, as it is related to documentation updates.

Notes

The suggested improvement is to add a short limitation note to the WebFetch documentation, which should help users understand the behavior of the tool when dealing with very large HTML pages.

Recommendation

Apply workaround: Add the limitation note to the WebFetch documentation to improve user understanding of the tool's behavior and help them avoid issues with truncated content.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [DOCS] WebFetch docs missing large-HTML truncation behavior [1 participants]