From bd3b0c712bf303c465e9a4162c641e5d70acd2e1 Mon Sep 17 00:00:00 2001 From: teknium1 Date: Mon, 16 Mar 2026 23:21:22 -0700 Subject: [PATCH] fix: make OAuth login URL prominent for SSH/headless users MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The URL is now the primary element — displayed in a bordered box before the browser auto-open attempt. Works for users who SSH into remote servers where webbrowser.open() silently fails. --- agent/anthropic_adapter.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/agent/anthropic_adapter.py b/agent/anthropic_adapter.py index dea1e8832..79f8ac1a4 100644 --- a/agent/anthropic_adapter.py +++ b/agent/anthropic_adapter.py @@ -463,17 +463,22 @@ def run_hermes_oauth_login() -> Optional[str]: print() print("Authorize Hermes with your Claude Pro/Max subscription.") print() - print("Open this link in your browser:") + print("╭─ Claude Pro/Max Authorization ────────────────────╮") + print("│ │") + print("│ Open this link in your browser: │") + print("╰───────────────────────────────────────────────────╯") print() print(f" {auth_url}") print() - # Try to open browser automatically (works on desktop, silently fails on headless) + # Try to open browser automatically (works on desktop, silently fails on headless/SSH) try: webbrowser.open(auth_url) + print(" (Browser opened automatically)") except Exception: pass + print() print("After authorizing, you'll see a code. Paste it below.") print() try: