[BUG] Fetch() tool against localhost http:// URLs fails because it tries https:// instead
Resolved 💬 3 comments Opened Oct 8, 2025 by simonw Closed Oct 11, 2025
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 told Claude Code to fetch http://127.0.0.1:8033/about/ - a page on my local development server. It failed like this:
▗ ▗ ▖ ▖ Claude Code v2.0.10
Sonnet 4.5 · Claude Max
▘▘ ▝▝ /private/tmp/temp
> Fetch http://127.0.0.1:8033/about/ and tell me about the JS
⏺ Fetch(http://127.0.0.1:8033/about/)
⎿ Error: write EPROTO 802C91F001000000:error:0A0000C6:SSL routines:tls_get_more_records:packet length too
long:ssl/record/methods/tls_common.c:663:
The Fetch() tool appeared to have attempted a fetch via https:// even though the URL starts http://.
In some cases Claude corrected itself by using curl like this, but it didn't do that reliably every time:
⏺ Bash(curl -s http://127.0.0.1:8033/about/)
⎿ <!DOCTYPE html>
<html lang="en-gb">
<head>
… +259 lines (ctrl+o to expand)
What Should Happen?
Claude should fetch URLs that start with http:// using HTTP - or if it attempts https:// first it should fall back to http:// if that fails.
Especially important for localhost or 127.0.0.1 URLs.
Error Messages/Logs
⎿ Error: write EPROTO 802C91F001000000:error:0A0000C6:SSL routines:tls_get_more_records:packet length too
long:ssl/record/methods/tls_common.c:663:
Steps to Reproduce
- Run a local webserver.
cd /tmp && python -m http.server 8001should do the trick. - In a fresh Claude Code session prompt
Fetch http://127.0.0.1:8001/ and tell me about it.
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.10 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗