[BUG] Fetch tool gives 403 error; curl does not

Resolved 💬 2 comments Opened Mar 1, 2026 by lukehutch Closed Mar 1, 2026

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?

I don't know if this is a User-Agent issue or what, but:

                                                                                                                                                                                                                                      
❯ Also add an instruction to check the text and the math for human cognitive biases, and fix them. Distill down this list into just the most important, common, and logically fatal biases:   https://en.wikipedia.org/wiki/List_of_cognitive_biases                                                                                                                                                                               
                                                                                                                                                                                                                                       
● Fetch(https://en.wikipedia.org/wiki/List_of_cognitive_biases)                                                                                                                                                                        
  ⎿  Error: Request failed with status code 403                                                                                                                                                                                        
                                                                                                                                                                                                                                       
● Web Search("Wikipedia list of cognitive biases complete categories: belief decision-making social biases memory")
  ⎿  Did 1 search in 6s                                                                                                                                                                                                                
                                                                                                                                                                                                                                       
● Fetch(https://gustdebacker.com/cognitive-biases/)
  ⎿  Interrupted · What should Claude do instead?                                                                                                                                                                                      
                                                                                                                                                                                                                                       
❯ Try fetching https://en.wikipedia.org/wiki/List_of_cognitive_biases again -- why isn't that working? It works in the browser.                                                                                                        
                                                                                                                                                                                                                                       
● Wikipedia blocks requests without a browser-like User-Agent header, which is what WebFetch uses. Let me try via curl instead.                                                                                                        
                                                                                                                                                                                                                                       
● Bash(curl -s -L -H "User-Agent: Mozilla/5.0" "https://en.wikipedia.org/wiki/List_of_cognitive_biases" | python3 -c "                                                                                                                 
      import sys, html, re…)                                                                                                                                                                                                           
  ⎿  For common errors in logic, see List of fallacies.                                                                                                                                                                                
                                                                  
     In psychology and cognitive science, cognitive biases are systematic patterns of deviation from norm and/or rationality in judgment. They are often studied in psychology, sociology and behavioral economics.                    
     … +65 lines (ctrl+o to expand)                               

What Should Happen?

The Fetch tool should use a standard browser User-Agent string

Error Messages/Logs

Steps to Reproduce

Ask Claude Code to fetch a Wikipedia article by URL

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

2.1.63

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗