[BUG] CLI outputs `mailto:` in front of all strings with "email-like" format, even when not applicable
Environment
- Platform (select one):
- [x] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other:
- Claude CLI version: 0.2.125
- Operating System: 15.4.1 (24E263)
- Terminal: Warp, oh-my-zsh
Bug Description
The CLI adds the mailto: label to emails (which I do think is generally useful!) However, it even does so in cases where it does not apply (such as when generating/parsing DB connection strings). I think the model should be given discretion on whether to prefix a string with mailto: or not, rather than the naive logic I think the CLI is currently doing.
Steps to Reproduce
- Ask the model to generate you a dummy postgressql connection string with a dummy domain name.
Expected Behavior
To receive something like: postgres://username:[email protected]:5432/database
Actual Behavior
Received: postgres://username:mailto:[email protected]:5432/database
Additional Context
Here's some more output that I think might be helpful for debugging:
I am having the same issue.
System Information
- Platform: Anthropic API
- Claude Version: Sonnet 4 (claude-sonnet-4-20250514)
- Operating System: macOS 15.5
- Terminal: xterm-ghostty
Bug Description
Claude Code incorrectly prefixes email addresses with "mailto:" even when explicitly asked not to do so. For example, when asked to output "[email protected]" without any formatting, Claude adds "mailto:" prefix.
Steps to Reproduce
- Ask Claude Code to output an email address like "[email protected]"
- Explicitly request no formatting or prefixes
- Claude still adds "mailto:" prefix
Expected Behavior
Email addresses should be output exactly as requested without automatic "mailto:" prefixing when explicitly told not to add formatting.
Actual Behavior
Claude automatically adds "mailto:" prefix despite instructions not to do so.
I am working with fediverse ids daily of the form [email protected] and this hits me constantly.
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.