Safe Reported AI & LLM Bots

OpenCode Agent

Operated by OpenCode

Quick Facts

User-Agent:
opencode
Category:
AI & LLM Bots
Operator:
OpenCode
Safety:
Safe
Blocking Impact:
Low - No SEO ranking impact
SEO Impact Score:
2/10
Official docs:
None published by OpenCode

Reported, not operator documented

OpenCode has not published a crawler page that names opencode. It is listed here because a credible public source does: ai.robots.txt. Reported OpenCode agent fetches. No vendor UA published.

What that means for you: the robots.txt rule on this page is the best available spelling, and a well-behaved crawler using this string will honour it, but there is no vendor statement of purpose, crawl rate or robots.txt compliance to rely on. Treat a matching request in your logs as a detection clue, not proof of who sent it, and combine the rule with a firewall rule if the traffic matters to you. If the operator publishes documentation, this profile moves to Official docs.

What is OpenCode Agent?

OpenCode Agent is an on-demand AI fetcher operated by OpenCode. It retrieves a page only when a user explicitly asks an AI assistant or agent to read, summarize, or act on a specific URL. Because it is triggered by real user intent rather than bulk crawling, blocking it mainly prevents users from pulling your content into OpenCode's assistant.

OpenCode Agent is an on-demand AI fetcher operated by OpenCode. It retrieves a page only when a user explicitly asks an AI assistant or agent to read, summarize, or act on a specific URL. Because it is triggered by real user intent rather than bulk crawling, blocking it mainly prevents users from pulling your content into OpenCode's assistant.
OpenCode Agent uses the user-agent token opencode. You can control it via robots.txt, meta tags (noai), or the emerging llms.txt standard. Robots.txt is voluntary; for hard enforcement, combine it with server-level IP blocking.

What happens if you block OpenCode Agent?

No SEO Impact - Blocking OpenCode Agent does not affect your rankings in Google, Bing, or any other search engine. OpenCode Agent is an AI crawler, not a traditional search indexer. You can freely block it via User-agent / Disallow: / without any SEO penalty.
Generally safe to allow; provides legitimate crawling value.

Want to see whether OpenCode Agent actually visits you? Read how do I monitor AI bot traffic to my website?

How to block OpenCode Agent with robots.txt

<code>User-agent: opencode</code> - Matching is case-insensitive. Robots.txt is fetched from the root of each subdomain separately.

Block completely (robots.txt)
User-agent: opencode Disallow: /
Allow all (robots.txt)
User-agent: opencode Allow: /
Block private only (robots.txt)
User-agent: opencode Disallow: /private/ Disallow: /api/ Disallow: /admin/ Allow: /
Nginx server block
# Nginx: Hard-block OpenCode Agent if ($http_user_agent ~* "opencode") { return 403 "Bot blocked"; }
Apache .htaccess
# Apache: Hard-block OpenCode Agent SetEnvIfNoCase User-Agent "opencode" bad_bot Order Allow,Deny Allow from all Deny from env=bad_bot
Meta robots tag
<meta name="robots" content="noindex, nofollow">
X-Robots-Tag header
X-Robots-Tag: noindex, nofollow

Is OpenCode Agent safe to allow?

Yes, OpenCode Agent is a safe and legitimate crawler operated by OpenCode. It follows the Robots Exclusion Protocol (RFC 9309) and can be controlled with standard robots.txt rules.
Verify by reverse-DNS lookup: legitimate OpenCode Agent requests resolve to OpenCode's domain.

What does OpenCode Agent do?

Understanding OpenCode Agent's purpose helps you decide whether to allow or block it.

  • Fetches a page only when a user asks an AI assistant to read it
  • Summarizes or extracts the URL the user provided
  • Triggered by real user intent, not bulk crawling
  • Low traffic volume compared with training crawlers
  • Blocking it prevents users from pulling your content into the assistant

Frequently Asked Questions

What is the official user-agent string for OpenCode Agent?
The official user-agent string for OpenCode Agent is: opencode. Use this exact string in robots.txt, Nginx, Apache, or Cloudflare firewall rules to target this bot. Matching in robots.txt is case-insensitive. Verify a request genuinely comes from OpenCode Agent by performing a reverse-DNS lookup on the source IP.
Is OpenCode Agent safe?
Yes, OpenCode Agent is a safe and legitimate crawler operated by OpenCode. It follows the Robots Exclusion Protocol (RFC 9309) and can be controlled with standard robots.txt rules.
Will blocking OpenCode Agent hurt my SEO?
No SEO Impact - Blocking OpenCode Agent does not affect your rankings in Google, Bing, or any other search engine. OpenCode Agent is an AI crawler, not a traditional search indexer. You can freely block it via User-agent / Disallow: / without any SEO penalty.
How do I block OpenCode Agent in robots.txt?
Add the following lines to your /robots.txt file:
User-agent: opencode
Disallow: /

This instructs OpenCode Agent not to crawl any path on your site. To block only specific sections, replace / with the path (e.g., Disallow: /blog/).
Does OpenCode Agent respect robots.txt?
OpenCode Agent is operated by OpenCode and is expected to fetch and parse /robots.txt before crawling, following RFC 9309. For hard enforcement, combine robots.txt with server-level IP or user-agent blocking.
How do I verify if OpenCode Agent is crawling my site?
Search your web server access logs for the string opencode (case-insensitive: grep -i "opencode" /var/log/nginx/access.log). Filter by user-agent in your log analytics tool (GoAccess, AWStats, etc.).