Claude Pro/Max authentication not usable over SSH #4322

Open
opened 2026-02-16 17:43:26 -05:00 by yindo · 2 comments
Owner

Originally created by @alethiophile on GitHub (Jan 6, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

When trying to sign in to Claude Pro/Max, the TUI pops up a window in the center of the screen with a long URL, then says "enter the authentication code". The docs suggest that it will automatically open a browser to this URL.

If using opencode on a remote server over SSH, the "automatically open a browser" function is obviously not usable. And, it's not easily possible to copy the long URL out of the popup box. The TUI's click override prevents highlighting the URL (or rather, you can highlight it with click and drag, but the highlight vanishes as soon as you release the mouse button, and you can't copy). Overriding the click override (by holding shift) lets you highlight the relevant text, but it also picks up a lot of cruft from the background window which you have to edit out manually in a text editor or similar.

In the case where it can't open a browser, the TUI should present the auth URL in full, without any click override to prevent copying, and without cruft in the background to pollute a forced copy.

Plugins

none

OpenCode version

1.1.3

Steps to reproduce

  1. Start opencode on a remote server over SSH
  2. Attempt to connect to a Claude Pro/Max plan
  3. fail

Screenshot and/or share link

No response

Operating System

Arch Linux

Terminal

alacritty/SSH/tmux

Originally created by @alethiophile on GitHub (Jan 6, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description When trying to sign in to Claude Pro/Max, the TUI pops up a window in the center of the screen with a long URL, then says "enter the authentication code". The docs suggest that it will automatically open a browser to this URL. If using opencode on a remote server over SSH, the "automatically open a browser" function is obviously not usable. And, it's not easily possible to copy the long URL out of the popup box. The TUI's click override prevents highlighting the URL (or rather, you can highlight it with click and drag, but the highlight vanishes as soon as you release the mouse button, and you can't copy). Overriding the click override (by holding shift) lets you highlight the relevant text, but it also picks up a lot of cruft from the background window which you have to edit out manually in a text editor or similar. In the case where it can't open a browser, the TUI should present the auth URL in full, without any click override to prevent copying, and without cruft in the background to pollute a forced copy. ### Plugins none ### OpenCode version 1.1.3 ### Steps to reproduce 1. Start opencode on a remote server over SSH 2. Attempt to connect to a Claude Pro/Max plan 3. fail ### Screenshot and/or share link _No response_ ### Operating System Arch Linux ### Terminal alacritty/SSH/tmux
yindo added the opentuibug labels 2026-02-16 17:43:26 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 6, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #6424: Claude Pro / Max Authorization Link Broken (VSCode Terminal) - same issue with authentication URL being difficult to copy in terminal environments
  • #5766: bug: OAuth uses wrong authorization URL and missing redirectUri config - related OAuth authentication issues

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 6, 2026): This issue might be a duplicate of existing issues. Please check: - #6424: Claude Pro / Max Authorization Link Broken (VSCode Terminal) - same issue with authentication URL being difficult to copy in terminal environments - #5766: bug: OAuth uses wrong authorization URL and missing redirectUri config - related OAuth authentication issues Feel free to ignore if none of these address your specific case.
Author
Owner

@alethiophile commented on GitHub (Jan 6, 2026):

This is the same bug as #6424. That bug was closed as a duplicate of #1168. However, I believe that was mistaken.

The proposed fix in #1168, of adding an explicit open-in-browser shortcut, would not fix this bug. The issue here is for situations such as remote server usage where the opencode app itself cannot automatically open a browser window. I believe the correct fix for this issue is to display the URL in a manner such that it can be copied through the terminal. (opencode trying to automatically copy it to the clipboard for you will also not work if running over SSH.)

Thus, this bug should remain open. (really, #6424 should have remained open, but.)

@alethiophile commented on GitHub (Jan 6, 2026): This is the same bug as #6424. That bug was closed as a duplicate of #1168. However, I believe that was mistaken. The proposed fix in #1168, of adding an explicit open-in-browser shortcut, would not fix this bug. The issue here is for situations such as remote server usage where the opencode app itself cannot automatically open a browser window. I believe the correct fix for this issue is to display the URL in a manner such that it can be copied through the terminal. (opencode trying to automatically copy it to the clipboard for you will also not work if running over SSH.) Thus, this bug should remain open. (really, #6424 should have remained open, but.)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4322