[BUG] The Fetch tool of Claude Code does not identify properly but uses a generic UA
Status Fixed / completed
Maintainer reply ✓ Yes — claude[bot]
Activity 15 comments · opened Sep 13, 2025 · closed Apr 17, 2026
💡 Likely answer: A maintainer (claude[bot], contributor)
responded on this thread — see the highlighted reply below.
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Hey, all!
The Fetch tool of Claude Code identifies as axios/1.8.4.
What Should Happen?
I think the tool should identify with something like this:
Claude Code Fetch (assistant; +https://example.com/some-page/)
Error Messages/Logs
Steps to Reproduce
Visit a website whose logs you have access to. Look at the web server logs for the visit.
Claude Model
Opus
Is this a regression?
No, this never worked
Last Working Version
_No response_
Claude Code Version
1.0.113 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
WSL (Windows Subsystem for Linux)
Additional Information
_No response_
15 Comments
You can just ask claude to fetch: https://httpbin.org/headers and https://httpbin.org/user-agent and you will see the results.
Hey all, again!
I did not mention it in my initial report but it is what made me open the issue:
I think some of the blocks for the Fetch tool may be because of that. (You block that agent if it has no business talking to your website.)
Then, changing to proper identification may result in more blocks in total.
So, more than a technical or etiquette issue. :-|
Wikipedia / Wikidata just started blocking Claude Code, because of Claude Code not setting a user agent, see phabricator issue T409871 and T400119
Leads to:
When setting a user agent, the usage is allowed:
Returns a successful request.
Referencing:
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
Still an issue
Any way to just set a custom user agent? - currently I'm completely completely blocking it and forcing Claude to use curl with a custom user agent:
Worth mentioning that Claude Code's WebFetch requests coming as such a generic user-agent that's otherwise very often used in abusive requests by malicious bots is leading to CC (understandably) being blocked from useful resources, which is quite a shame.
Indeed, I blocked WebFetch completely and set up this script which will use my real chrome with cookies and all, so it can look at websites I'm logged in on and it has a --no-headless option to actually show the chrome window in case I need to manually go through any captchas, etc. It also outputs websites in markdown so it's gentle on the context window and can list attachments like images / pdfs / videos / etc on the page. It also caches results as Claude tends to re-fetch the same URL multiple times:
Got blocked again two or three times today.
Last block was on this:
https://developer.apple.com/documentation/safari-release-notes/safari-26_3-release-notes
Adding a real-world case for this: we use Cloudflare Super Bot Fight Mode and added a
bypass rule matching User-Agent contains "Claude" — which worked for
Claude web chat. But Claude Code's WebFetch still gets blocked with a 403 because it's
sending
axios/1.13.4as the User-Agent, at least in the VS Code extension.This means even sites that are actively trying to allowlist Claude can't do so for
Claude Code without also allowlisting the generic
axiosUA, which defeats the purposeof bot protection.
A proper UA like
ClaudeCode/1.x (Anthropic)would fix this and better align with howClaudeBot already identifies itself for web crawling.
In CC v2.1.83, it's sending
Claude-User (claude-code/2.1.83; +https://support.anthropic.com/)as a UA.@aveao confirmed UA is now sending
Claude-User (claude-code/2.1.83; +https://support.anthropic.com/)after updating Claude Code extension to v2.1.83 - thank you!!Same here; confirmed.
This issue was fixed as of version 2.1.83.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.