[BUG] OAuth URL printed in the console on /login contains spaces even when copied (via c)

Resolved 💬 3 comments Opened Mar 10, 2026 by igroeg64 Closed Mar 14, 2026

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?

When I try to authenticate via /login I have to use OAuth. I'm running claude-code in a container. It prints the OAuth URL, but pads it with spaces on the right and on the left. The URL is long and takes up 3 lines. When I copy it (either by selecting from the console or via pressing 'c') the spaces are also copied and the URL is useless. I have to edit it to remove spaces.

What Should Happen?

If I have to use OAuth for some unknown reason, so be it. Just print the URLs correctly.

Error Messages/Logs

Steps to Reproduce

start claude-code
Type /login
Select option: 1. Claude account with subscription · Pro, Max, Team, or Enterprise
claude-code prints OAuth URL on the console. It may take several lines and is padded with spaces on both left and right.
coping this URL will also copy the spaces...

Claude Model

Opus

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.72

Platform

Anthropic API

Operating System

Other Linux

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗

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