[BUG] Title: Auth URL line-wraps in JetBrains IDE terminal, making clickable link invalid
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
During the authorization flow (claude first run), the authentication URL is printed to the terminal without any line-wrap protection. In the JetBrains IDE embedded terminal (IntelliJ IDEA on Windows), the URL gets split across two lines, and clicking it opens only the first fragment — resulting in an invalid URL and a failed auth attempt.
Actual behavior: Only the first line of the split URL is followed. The browser opens an invalid/incomplete URL.
Workaround: Manually copy the full URL (both line fragments) and paste it into the browser address bar.
Environment:
Claude Code version: 2.1.158
OS: Windows 11
Terminal: JetBrains IntelliJ IDEA embedded terminal (via JetBrains Toolbox)
What Should Happen?
The full URL opens in the browser and authentication succeeds.
Error Messages/Logs
browser shows an invalid action message.
Steps to Reproduce
- Open the embedded terminal inside IntelliJ IDEA (Windows)
- Run
claudefor the first time to trigger the auth flow - Observe the authentication URL printed to the terminal
- Click the link
Claude Model
Sonnet (default)
Is this a regression?
I don't know
Last Working Version
_No response_
Claude Code Version
2.1.158 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
IntelliJ IDEA terminal
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗