# OpenCode-User

> OpenCode-User is the user agent of the webfetch tool in OpenCode, an open source coding agent. Its code fetches pages with no robots.txt check.

Canonical: https://promptlyfound.com/crawlers/opencode-user
Updated: 2026-12-02

## Short answer

OpenCode-User is the user agent that the webfetch tool in OpenCode sends. OpenCode is an open source coding agent that runs on each user's machine. **OpenCode's webfetch code contains no robots.txt check, so a Disallow rule does not stop these fetches.** If a Cloudflare challenge blocks a fetch, the code tries again with the user agent opencode. The OpenCode documentation names no user agent.

## Key findings

- OpenCode's documentation says the webfetch tool retrieves one HTTP or HTTPS URL as markdown, text or HTML. [1]
- OpenCode's webfetch source code sets the user agent to the OpenCode-User/1.0 string. [2]
- The webfetch source code requests the URL directly. It contains no robots.txt check. [2]
- If a Cloudflare challenge answers with status 403, the webfetch code tries the request again with the user agent opencode. [2]
- OpenCode-User made 1 request to our site, with the user agent in the OpenCode source code.

## What happens if I block OpenCode-User?

OpenCode-User fetches a page when an OpenCode agent asks for it. [OpenCode](https://opencode.ai/) is an open source coding agent from Anomaly. It works on the user's own machine.[3] [OpenCode's tools documentation](https://opencode.ai/docs/tools) says the webfetch tool retrieves one HTTP or HTTPS URL as markdown, text or HTML.[1] The user can allow or deny the tool for each URL with a permission rule.

The documentation does not name a user agent. The [webfetch source code](https://github.com/anomalyco/opencode/blob/dev/packages/core/src/tool/plugin/webfetch.ts) does: it sends "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; OpenCode-User/1.0; +https://opencode.ai".[2] The same code requests the URL directly and contains no robots.txt check. So a robots.txt rule does not stop these fetches.

## How do I block OpenCode-User in robots.txt?

You cannot block it with robots.txt, because the webfetch code does not read the file. To refuse these fetches, add a server or firewall rule that matches "OpenCode-User" in the user agent.

The code has a fallback. If a Cloudflare challenge answers with status 403, it tries the request again with the plain user agent "opencode".[2] A firewall rule that matches only "OpenCode-User" does not catch that second request.

## How do I check that a request is from OpenCode-User?

You cannot verify an OpenCode-User request. OpenCode publishes no IP list and does not sign the requests. Each user runs the tool on their own machine, so any client can send the name. Treat OpenCode-User in your logs as a claim.

## Sources

1. Tools. OpenCode documentation. https://opencode.ai/docs/tools
2. packages/core/src/tool/plugin/webfetch.ts. OpenCode on GitHub. https://github.com/anomalyco/opencode/blob/dev/packages/core/src/tool/plugin/webfetch.ts
3. The open source coding agent. OpenCode. https://opencode.ai/

---

This is a plain-text copy of https://promptlyfound.com/crawlers/opencode-user from Promptly Found. The web page is the canonical version and includes the charts.
