hermes - ✅(Solved) Fix [Bug]: hermes setup freezes terminal when pasting API keys on Linux [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Root Cause

The prompt() function in hermes_cli/setup.py (and cli_output.py) uses getpass.getpass() when password=True:

def prompt(question, default=None, password=False):
    if password:
        import getpass
        value = getpass.getpass(color(display, Colors.YELLOW))
    else:
        value = input(color(display, Colors.YELLOW))

On Linux, getpass.getpass() uses termios to disable echo. When pasting text, the terminal state can become corrupted and echo is not restored properly.

This affects:

  • _prompt_api_key() in setup.py (line 331-334)
  • _run_quick_setup() missing env vars (line 3084, 3172)
  • TTS provider prompts (lines 991, 1003, 1015, 1032, 1044, 1057)
  • Messaging platform token prompts (Telegram, Discord, Slack, Mattermost)
  • Tool config prompts in tools_config.py
  • MCP config in mcp_config.py
  • Missing env var prompts in config.py

Fix Action

Fixed

PR fix notes

PR #13046: fix: terminal freeze when pasting API keys in hermes setup on Linux

Description (problem / solution / changelog)

Fix

Removes (getpass.getpass) from all API key and token prompts in the setup wizard.

Root Cause: uses to disable echo on Linux. When pasting text, the terminal state can become corrupted and echo is not restored, leaving the terminal frozen.

Solution: API keys are not sensitive enough to warrant hidden input. Changed to use regular instead. Actual passwords (sudo, email passwords) still use .

Files Changed

    • , quick setup, TTS providers, messaging tokens
    • Tool provider API key prompts (new + reconfigure)
    • MCP server API key prompt
    • Missing env var prompts

Fixes #13033

Changed files

  • hermes_cli/config.py (modified, +10/-10)
  • hermes_cli/mcp_config.py (modified, +5/-1)
  • hermes_cli/setup.py (modified, +35/-28)
  • hermes_cli/tools_config.py (modified, +24/-7)

Code Example

def prompt(question, default=None, password=False):
    if password:
        import getpass
        value = getpass.getpass(color(display, Colors.YELLOW))
    else:
        value = input(color(display, Colors.YELLOW))
RAW_BUFFERClick to expand / collapse

Bug Description

When running hermes setup on Linux (zsh/bash), pasting an API key causes the terminal to freeze and typing becomes disabled. The terminal echo gets corrupted and the user must close and reopen the terminal.

Steps to Reproduce

  1. Run hermes setup on Linux
  2. Navigate to Model & Provider setup
  3. Select a provider that requires an API key (e.g., OpenRouter)
  4. Paste (Ctrl+Shift+V or middle-click) an API key at the prompt
  5. Terminal becomes unresponsive, echo is disabled

Expected Behavior

API key should be pasted and visible in the prompt, terminal should remain responsive after submission.

Actual Behavior

Terminal freezes after paste. Echo remains disabled. User cannot type anything and must close/open a new terminal.

Affected Component

  • Setup / Installation
  • Configuration (config.yaml, .env, hermes setup)

Root Cause Analysis

The prompt() function in hermes_cli/setup.py (and cli_output.py) uses getpass.getpass() when password=True:

def prompt(question, default=None, password=False):
    if password:
        import getpass
        value = getpass.getpass(color(display, Colors.YELLOW))
    else:
        value = input(color(display, Colors.YELLOW))

On Linux, getpass.getpass() uses termios to disable echo. When pasting text, the terminal state can become corrupted and echo is not restored properly.

This affects:

  • _prompt_api_key() in setup.py (line 331-334)
  • _run_quick_setup() missing env vars (line 3084, 3172)
  • TTS provider prompts (lines 991, 1003, 1015, 1032, 1044, 1057)
  • Messaging platform token prompts (Telegram, Discord, Slack, Mattermost)
  • Tool config prompts in tools_config.py
  • MCP config in mcp_config.py
  • Missing env var prompts in config.py

Proposed Fix

Remove password=True from all API key and token prompts. API keys are not sensitive enough to warrant hidden input. Actual passwords (sudo, email) should keep password=True.

Files to modify:

  • hermes_cli/setup.py - Remove password=True from all API key/token prompts
  • hermes_cli/tools_config.py - Same
  • hermes_cli/mcp_config.py - Same
  • hermes_cli/config.py - Same

Environment

  • OS: Linux (zsh/bash)
  • Python: 3.13.11
  • Hermes: v0.10.0 (2026.4.16)

PR Ready

  • I'd like to fix this myself and submit a PR

extent analysis

TL;DR

Remove password=True from API key and token prompts in the affected files to prevent terminal freeze when pasting.

Guidance

  • Identify all instances of password=True in hermes_cli/setup.py, hermes_cli/tools_config.py, hermes_cli/mcp_config.py, and hermes_cli/config.py where API keys or tokens are prompted.
  • Remove password=True from these instances to allow for normal input and prevent terminal corruption.
  • Verify the fix by running hermes setup and pasting an API key to ensure the terminal remains responsive.
  • Consider reviewing other areas of the code where getpass.getpass() is used to ensure similar issues are not present.

Example

# Before
def _prompt_api_key():
    api_key = prompt("Enter API key: ", password=True)

# After
def _prompt_api_key():
    api_key = prompt("Enter API key: ")

Notes

This fix assumes that API keys and tokens do not require the same level of secrecy as passwords. If security requirements dictate that these should be hidden, an alternative solution will be needed.

Recommendation

Apply workaround: Remove password=True from API key and token prompts, as API keys are not considered sensitive enough to warrant hidden input, and this change should resolve the terminal freezing issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix [Bug]: hermes setup freezes terminal when pasting API keys on Linux [1 pull requests]