[BUG] /copy does not preserve terminal hyperlinks as markdown links

Resolved 💬 3 comments Opened Feb 20, 2026 by segiddins Closed Mar 21, 2026

Description

When Claude's response contains terminal hyperlinks (OSC 8 escape sequences), the /copy command copies only the visible link text without the underlying URL. The URLs are lost entirely in the clipboard output.

Steps to reproduce

  1. Ask Claude to generate a response that includes links (e.g. GitHub PR URLs rendered as terminal hyperlinks)
  2. Run /copy
  3. Paste the clipboard contents

Expected behavior

Terminal hyperlinks should be converted to markdown links in the copied output, e.g. [PR #123](https://github.com/org/repo/pull/123), so the URL is preserved.

Actual behavior

Only the visible link text is copied. The underlying URL from the terminal hyperlink is stripped, making it impossible to share responses containing links via /copy.

Environment

  • Claude Code CLI (macOS)
  • Terminal: iTerm2

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗