A URL that wraps onto a second terminal line opens truncated on click

Status Open
Maintainer reply None cached
Activity 0 comments · opened Sep 25, 2026

Summary

A URL in Claude's reply that is longer than the terminal width wraps onto a second line, and clicking it opens only the part on one line. The truncated address then 404s.

This revives #73114, which reported the same for the MCP OAuth URL and was closed on 2026-09-08 as inactive. The problem is not specific to OAuth URLs: any long link Claude prints hits it.

Steps to reproduce

  1. Open Claude Code in a terminal narrower than about 100 columns (seen in the VS Code integrated terminal on macOS).
  2. Ask Claude for a link to a file on a GitHub repository's main branch, so the reply contains a URL of about 110 characters.
  3. Cmd+click (or Ctrl+click) the link.

Expected

The whole URL opens, as it does for a URL that fits on one line.

Actual

Only the fragment on the clicked line is treated as the link, so the browser opens a truncated URL.

Environment

  • Claude Code CLI inside the VS Code integrated terminal
  • macOS, Darwin 25.5.0
  • Model: Claude Fable 5.1

Possible fix

Emit links with the OSC 8 hyperlink escape sequence, so the terminal knows the link's full target regardless of where the text wraps. Terminals that support OSC 8 (iTerm2, VS Code, WezTerm, Kitty, and others) then open the full URL from any wrapped line.

View original on GitHub ↗