[BUG] substantial billing for 3 hours hung and failing to time out
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?
this is a billing problem
for which claude.ai directed me here to submit
though bug report is the closest option
Mark ODell
emark@alumni.caltech.edu
WebFetch Tool Hang Bug Report
Date: 2025-01-21
Session: earth geospatial tool development
Cost Impact: ~$20 for 3 hours of hung operation
Issue Summary
WebFetch tool hung for approximately 3 hours without timing out,
incurring significant API charges during the hang period.
charged for ~ 3 hours while the API was hung and failed to time out
seems like cost went up $20~$30 with nothing happening and not timing out
What to report:
- WebFetch tool on fcc.gov/media/radio/fm-query hung for ~3 hours without
timeout
- Should have timed out within seconds/minutes, not hung for hours
- Cost increased by ~$20 during the hang
- Session timestamp: [the time this happened]
- Expected: Tool should timeout gracefully, not hang and rack up charges
Expected behavior:
- WebFetch should timeout in <60 seconds if unresponsive
- Zero cost should be incurred during a hung/failed operation
- Tool should return an error, not hang silently
This is clearly a bug in Claude Code's tool infrastructure, not user
error. You should get a refund for those charges.
Do you want me to save the session history showing this issue before you
report it, or should I wait while you file the bug report?
─────────────────────────────────────────────────────────────────────────────
WebFetch Tool Hang Bug Report
Date: 2025-01-21
Session: earth geospatial tool development
Cost Impact: ~$20 for 3 hours of hung operation
Issue Summary
WebFetch tool hung for approximately 3 hours without timing out, incurring significant API charges during the hang period.
Timeline
- Successful WebFetch calls:
- URL:
https://www.qrz.com/docs/xml/current_spec.html- completed successfully - URL:
https://hamcallsigns.com/callsign=n2drk- completed successfully
- Failed WebFetch call:
- URL:
https://www.fcc.gov/media/radio/fm-query - Purpose: Query FCC FM station lookup API documentation
- Result:
<error>canceled</error> - Duration: Approximately 3 hours before user cancellation
- User observation: "the interface showed 3 hours since last interaction, and was still running"
Cost Impact
- Session showed API time increase of ~1.5 hours
- Cost increased by approximately $20 during the hang
- Total session cost: $31.04
- Estimated cost without bug: ~$11
Expected Behavior
- WebFetch should timeout within 30-60 seconds for unresponsive URLs
- Tool should return an error message gracefully
- No API charges should accrue during a hung/failed operation
- User should be notified immediately if fetch fails
Actual Behavior
- WebFetch hung for ~3 hours without timeout
- No error returned to user during hang
- API charges continued to accrue during hang period
- Only resolved when user manually canceled
- Eventually returned:
<error>canceled</error>
Reproduction Information
Tool invocation that caused hang:
- Tool: WebFetch
- Target URL: https://www.fcc.gov/media/radio/fm-query
- Prompt: "What is the URL format for querying FM stations by callsign..."
Context:
This was the third WebFetch in sequence. First two completed normally in seconds.
This specific URL (FCC government site) appears to have caused the hang.
Session Details
Token usage at time of hang:
- Input: ~114k tokens
- Output: ~262k tokens
- Cache reads: 43.7M
- Web searches: 11
Model: claude-sonnet-4-5
Requested Action
- Refund: ~$20 for charges incurred during 3-hour hang
- Bug fix: Implement proper timeout for WebFetch tool
- Prevention: Add safeguards to prevent charging during tool failures
Contact
- GitHub Issue: https://github.com/anthropics/claude-code/issues
- User: emark
- Session log: Available in /Users/emark/AI_claude/hist/
What Should Happen?
time out promptly and STOP CHARGING
Error Messages/Logs
Steps to Reproduce
unknown, but see logs
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
2.0.42
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 ↗