DashboardopencodeOpenCode webfetch implementations, limi…

OpenCode webfetch implementations, limits, and HTTP failures

Category: architecture
Confidence: 0.90
ID: 01a0829e-09b9-71bf-b6d9-c46ce77dcc52
Project ID: c0425955-02bc-4c17-9af2-b114c00077e7
Cross-project: No
Recalled in other projects: 1
Source session: 0nN06O4MLYAtzl82C
Created: 2026-06-29 15:43:01
Updated: 2026-09-08 20:03:10

Cross-Project Recalls

ProjectHitsLast recalled
opencode-lore 6 13h ago

Content

Two implementations exist: legacy packages/opencode/src/tool/webfetch.ts (tool.fetch) and newer packages/core/src/tool/webfetch.ts. Core streams through collectBoundedResponseBody and fails as soon as bytes exceed 5 MB; legacy buffers the body after an optional Content-Length precheck and can emit images as base64 attachments, while core rejects non-text/image MIME types. Both use 30-second default and 120-second maximum timeouts, Chrome UA spoofing, Cloudflare 403 retry, and HTML conversion without Readability-style boilerplate removal. Non-2xx responses intentionally raise other:statuscode-non-xx-status; verify URL, authentication, redirects, and final status rather than repeatedly retrying.

Move to: