claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] CLI outputs `mailto:` in front of all strings with "email-like" format, even when not applicable

Open sigmachirality opened this issue 8 months ago • 3 comments

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

  1. 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

Image

sigmachirality avatar May 22 '25 01:05 sigmachirality

Here's some more output that I think might be helpful for debugging:

Image

sigmachirality avatar May 22 '25 02:05 sigmachirality

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

  1. Ask Claude Code to output an email address like "[email protected]"
  2. Explicitly request no formatting or prefixes
  3. 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.

skcalanderson2 avatar Jun 07 '25 01:06 skcalanderson2

I am working with fediverse ids daily of the form [email protected] and this hits me constantly.

shipoclu avatar Jun 16 '25 09:06 shipoclu

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.

github-actions[bot] avatar Oct 10 '25 10:10 github-actions[bot]