Auth URL breaks when terminal wraps long lines

Resolved 💬 3 comments Opened Mar 17, 2026 by t-chamb Closed Mar 21, 2026

Problem

During /login, the OAuth URL is printed as raw text. On terminals with limited width (e.g. Termius on iOS), the URL gets hard-wrapped with line breaks inserted into the middle of URL parameters, making it impossible to copy or tap.

Example of the broken output:

https://claude.ai/oauth/authorize?code=true&client_id=9d1c2
50a-e61b-44d9-88ed-5944d1962f5e&response_type=code&redirect
_uri=https%3A%2F%2Fplatform.claude.com%2Foauth%2Fcode%2Fcal
lback&scope=org%3Acreate_api_key+user%3Aprofile+user%3Ainfe
rence+user%3Asessions%3Aclaude_code+user%3Amcp_servers&code
_challenge=xLTen40MTQdlcx6fWvxv8-KA2UuTOY8EOI1bWlU5lgU&code
_challenge_method=S256&state=JRuz6_oRjYyHrF2a5YV4LgbvIMb2T-
wYG0M7PbDSIEQ

The line breaks split parameter values (e.g. 9d1c2\n50a should be 9d1c250a), making the URL unusable.

Expected behavior

The auth URL should be clickable/copyable regardless of terminal width.

Suggested fix

Use OSC 8 hyperlink escape sequences to wrap the URL, so terminals that support it (iTerm2, Tabby, Termius, etc.) can render it as a proper clickable link that survives line wrapping.

Environment

  • Termius on iOS
  • Claude Code CLI via SSH

View original on GitHub ↗

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