Skip to content

Handle openhands login failure gracefully#12

Merged
juhgiyo merged 3 commits intomainfrom
claude/graceful-login-failure
Mar 17, 2026
Merged

Handle openhands login failure gracefully#12
juhgiyo merged 3 commits intomainfrom
claude/graceful-login-failure

Conversation

@juhgiyo
Copy link
Copy Markdown
Contributor

@juhgiyo juhgiyo commented Mar 17, 2026

Summary

  • openhands login fails with HTTP 402 when user lacks OpenHands Cloud credits (BYOR not enabled)
  • Instead of hard-exiting, print a message guiding user to set LLM_API_KEY and continue setup
  • StrawPot onboarding also offers the "API key" option separately

Test plan

  • Run setup with OpenHands Cloud account (no credits) — verify graceful failure message
  • Run setup with valid OpenHands Cloud account — verify login succeeds normally
  • Verify StrawPot onboarding continues after login failure

🤖 Generated with Claude Code

juhgiyo and others added 3 commits March 17, 2026 10:17
openhands login connects to OpenHands Cloud which requires purchased
credits for BYOR (Bring Your Own Key). Instead of hard-exiting on
failure, print a helpful message about using LLM_API_KEY and continue.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
openhands login fails with HTTP 402 (BYOR requires credits) and the
TUI doesn't render in a subprocess. Instead, instruct user to run
openhands in a new terminal for initial config (same pattern as gemini).

Also set TTY_INTERACTIVE=1 in build env to suppress Rich's
non-interactive terminal warning when running in headless mode.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Tests now verify TTY_INTERACTIVE=1 is always present in env output,
while LLM_MODEL is only present when a model is configured.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@juhgiyo juhgiyo merged commit 6ffd685 into main Mar 17, 2026
1 check passed
@juhgiyo juhgiyo deleted the claude/graceful-login-failure branch March 17, 2026 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant