[BUG] WebSearch tool causes unreadable output due to incorrect citation formatting
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?
Description
When Claude Code uses the WebSearch tool, it wraps entire sentences and paragraphs as markdown link text instead of writing normal readable text. This results in completely unreadable responses where URLs appear instead of actual content.
Actual Behavior
Claude wraps entire sentences as markdown links, making the text completely unreadable:
Example of actual output (as rendered):
### 1. Serious Safety Concerns & Drug Scene
https://en.wikipedia.org/wiki/Moabit. https://en.wikipedia.org/wiki/Kleiner_Tiergarten.
https://en.wikipedia.org/wiki/Kleiner_Tiergarten.
https://housinganywhere.com/Berlin--Germany/areas-to-avoid-in-berlin.
https://originalberlintours.com/which-neighborhoods-should-you-avoid-in-berlin/.
While police designated Kleiner Tiergarten as a
https://en.wikipedia.org/wiki/Kleiner_Tiergarten and later removed that status,
skepticism about improvements remains.
The actual content that should be displayed is completely replaced by URLs.
Root Cause
The WebSearch tool documentation likely contains instructions like:
"CRITICAL REQUIREMENT - You MUST include sources in your response using markdown hyperlinks"
Claude is interpreting this by wrapping entire sentences/paragraphs as link text:
[Post-reunification, Moabit has faced drug trafficking and abuse (especially around Kleiner Tiergarten), poverty and crime.](https://en.wikipedia.org/wiki/Moabit)
When rendered, this displays only the URL, not the bracketed content.
Impact
- Severity: High - Makes WebSearch responses completely unusable
- Frequency: Occurs consistently whenever WebSearch is used with detailed research queries
- User Experience: Users cannot read research results and must ask Claude to rewrite without sources
Suggested Fix
Update the WebSearch tool instructions to specify one of these citation formats:
Option 1: Sources section at end
[Normal readable content here]
## Sources
- [Source Title](URL)
- [Source Title](URL)
Option 2: Numbered inline references
Post-reunification, Moabit has faced drug trafficking [1] and crime issues [2].
[1] https://en.wikipedia.org/wiki/Moabit
[2] https://example.com/source
Option 3: Keyword-only linking
Post-reunification, Moabit has faced [drug trafficking](URL) and poverty issues.
The current behavior (wrapping full sentences as link text) should be explicitly prohibited.
Workaround
When Claude saves research to files (using Write tool), the formatting is correct because it doesn't use the problematic inline citation format. Users can:
- Ask Claude to save research findings to a file
- Read the file for properly formatted content
- Ignore the unreadable conversational response
What Should Happen?
Expected Behavior
The response should contain:
- Normal readable text with the research findings
- Sources listed separately at the end (similar to how academic papers cite sources)
- OR inline numbered references like
[1]that map to a sources list - OR occasional keyword/phrase links where appropriate
Example of expected formatting:
### 1. Serious Safety Concerns & Drug Scene
**This is the most significant issue.** Post-reunification, Moabit has faced drug
trafficking and abuse (especially around Kleiner Tiergarten), poverty and crime.
Drug-related offenses surged from 65 cases (Jan-Nov 2015) to 480 in 2016 and 540
in 2017. Residents reported being approached frequently by mostly young men trying
to sell drugs, plus robberies and violence.
Error Messages/Logs
Steps to Reproduce
Steps to Reproduce
- Ask Claude Code to research a topic that requires WebSearch
- Request detailed information that will involve multiple sources
- Observe the response formatting
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.0.72
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
Additional Context
- This issue has existed for "a couple of weeks" as of December 19, 2025
- The bug only affects conversational responses, not files written to disk
- Claude acknowledges the issue but states it will likely continue making the same mistake due to systemic tool instruction interpretation
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗