anomalyco / anomalyco/opencode
webfetch returns 202/204 responses as page content with no way for the model to tell
@neriousy is already working on this.
Since Sep 8, 2026.
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- PR merge metrics
- PR metrics pending
Description
Description
The tool only reports content-type in title and returns metadata: {}, so a
2xx-but-not-200 response is indistinguishable from a successful fetch.
Concrete case: a rate-limited egress IP gets HTTP 202 + an empty text/html
body from a search engine. webfetch returns an empty string, and the model
reads that as "the page has no content" rather than "I was throttled, try
another route". Non-2xx is fine — filterStatusOk already surfaces the status
in the error. The gap is 202 / 203 / 204 / 206.
Plugins
None
OpenCode version
1.18.1
Steps to reproduce
-
Start a server that returns
202 Acceptedwith an HTML body:bun -e 'Bun.serve({ port: 8787, fetch: () => new Response("
throttled
", { status: 202, headers: { "content-type": "text/html" } }) })' -
In opencode, fetch it:
webfetch http://127.0.0.1:8787 with format "text"
-
Look at the tool result.
Expected: something in the result tells the model the response was 202, so it can
treat the body as an interstitial rather than the page content.
Actual: the result is just throttled, with title http://127.0.0.1:8787 (text/html)
and metadata: {}. Nothing distinguishes it from a normal 200.
Screenshot and/or share link
No response
Operating System
Ubuntu 22.04.5 LTS (kernel 6.8.0-124-generic)
Terminal
VS Code integrated terminal
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.