Log in
Sign up with Google

AI assistant fetcher · Anomaly

OpenCode is Anomaly’s AI assistant fetcher

OpenCode is an open-source AI coding agent. It fetches web pages when a developer's session needs documentation or examples.

Our take

Allow

It acts on behalf of individual developers, much like a browser.

User agent

Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; OpenCode-User/1.0; +https://opencode

01 · Operator

Who operates OpenCode

Company
Anomaly
Official docs
opencode.ai

02 · Behavior

What OpenCode does

OpenCode runs in the terminal, IDE or desktop and supports several LLM providers. Its visits are triggered by user actions, not by a scheduled crawl. It retrieves documentation, API references or examples for the code being written.

03 · Impact

Why OpenCode matters for your site

If you allow it

  • Developers can read your documentation through their coding agent
  • Visits are user-triggered and low volume

If you block it

  • Content is consumed without a page view
  • No published way to verify requests

04 · Allow

How to allow OpenCode

robots.txt

User-agent: opencode
Allow: /

Cloudflare

# Security › WAF › Custom rules › Create rule
Expression: (http.user_agent contains "opencode")
Action:     Skip › All Super Bot Fight Mode rules

# Also check Security › Bots: "Block AI bots" can block it regardless of robots.txt.

WordPress

# WordPress serves a virtual robots.txt. Edit it with your SEO plugin:
# Yoast: SEO › Tools › File editor · Rank Math: General Settings › Edit robots.txt
User-agent: opencode
Allow: /

nginx

# nginx serves every user agent by default.
# Make sure no rule like this blocks it:
# if ($http_user_agent ~* "opencode") { return 403; }

Apache

# Apache serves every user agent by default.
# Make sure .htaccess has no rule like this:
# RewriteCond %{HTTP_USER_AGENT} opencode [NC]
# RewriteRule .* - [F,L]

05 · Block

How to block OpenCode

Start with robots.txt. If OpenCode keeps showing up in your logs, block it at your CDN or web server.

robots.txt

User-agent: opencode
Disallow: /

Cloudflare

# Security › WAF › Custom rules › Create rule
Expression: (http.user_agent contains "opencode")
Action:     Block

WordPress

# WordPress serves a virtual robots.txt. Edit it with your SEO plugin:
# Yoast: SEO › Tools › File editor · Rank Math: General Settings › Edit robots.txt
User-agent: opencode
Disallow: /

nginx

# In your server { } block:
if ($http_user_agent ~* "opencode") {
    return 403;
}

Apache

# .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} opencode [NC]
RewriteRule .* - [F,L]
</IfModule>

06 · User agents

User agents we see for OpenCode

The user agent published by the operator:

Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; OpenCode-User/1.0; +https://opencode

07 · Verification

Is it really OpenCode?

OpenCode’s operator publishes no IP ranges or hostnames, so requests cannot be verified. Treat the user agent as a claim, and watch your logs for unusual request rates.

FAQ

Questions about OpenCode

Is OpenCode a crawler?

No. It is an AI coding agent that fetches pages when a user's session requests them.

Does OpenCode use my content for AI training?

Known Agents lists training as not an expected use. Fetched content goes to the LLM the developer has configured.

How do I block OpenCode?

Known Agents suggests "User-agent: opencode" with "Disallow: /". Because visits are user-triggered, a server or WAF rule on the user agent is more reliable.

Last updated Nov 10, 2026

Your site

See which pages OpenCode crawls on your website

Log Hero reads your server logs and shows every AI bot, every page, every day.

Sign up with Google

Free during early access