Claude-Code
The user-agent Claude Code sends when a developer asks it to fetch a URL. Documented by Anthropic alongside its other three bots.
Reference reviewed by Sona
| Operator | Anthropic |
|---|---|
| Powers | Web fetches from the Claude Code CLI |
| Purpose | User-triggered fetch |
| User-agent token | Claude-Code |
| Respects robots.txt | Yes |
Claude-Code identifies web fetches made by Anthropic's Claude Code CLI - when a developer working in the tool asks it to read a documentation page, an issue, or any other URL, the request goes out under a claude-code/ user-agent with the CLI's release version.
Anthropic documents it as the fourth member of its bot family, next to ClaudeBot (training), Claude-SearchBot (search index), and Claude-User (chat fetches), and states it respects robots.txt. Because the version segment changes with each release, match on the claude-code/ prefix or the Claude-Code robots.txt token.
Full user-agent string
claude-code/2.0
Allow Claude-Code
Developers using Claude Code can pull your docs and references into their coding sessions - valuable if developers are your audience.
User-agent: Claude-Code Allow: /
Block Claude-Code
You want no tool-driven programmatic access, even developer-initiated single-page fetches.
User-agent: Claude-Code Disallow: /
Can Claude-Code read your page right now?
Test any URL and see exactly what AI crawlers receive.