hermes-agent/hermes_cli
ygd58 70957591ff fix(update): handle UnicodeDecodeError in interactive update prompts
Ports #68497 forward onto current main per teknium1's review.

input() can raise UnicodeDecodeError when the terminal encoding
cannot decode the byte sequence (e.g. a non-UTF-8 locale, or an
embedded terminal). The prior port targeted hermes_cli/main.py, the
pre-refactor location -- the update pipeline moved to
hermes_cli/update_cmd.py in 927463efcc.

Per review, fixed all three interactive update prompts that call
input() directly, not just the one this originally targeted:

1. Config-migration prompt (update_cmd.py:~3989): extends the existing
   except EOFError to also catch UnicodeDecodeError, prints an
   actionable 'hermes config migrate' hint, and falls through to the
   skip branch (response=n).
2. Stash-restore prompt (_restore_stashed_changes, ~line 971): the raw
   input() call here had NO exception guard at all -- not even for
   EOFError. Added a try/except covering both EOFError and
   UnicodeDecodeError, falling back to the existing skip-restore path
   (changes remain safely in git stash, restorable manually).
3. Upstream-remote prompt (_sync_with_upstream_if_needed, ~line 1274):
   already caught (EOFError, KeyboardInterrupt) but not
   UnicodeDecodeError -- added it to the existing tuple.

Also dropped the incorrect #12884 reference (a TUI sticky-scroll
report, unrelated to this update-encoding issue, per the review).

4 new tests pass covering all three call sites (config-migration prompt
via cmd_update end to end, stash-restore and upstream-remote prompts
via direct unit tests against their own functions), plus an EOFError
sanity test confirming the stash-restore fix doesn't regress that case
either (it had no guard before). 6/6 in the full
tests/hermes_cli/test_update_yes_flag.py file (no regression).
2026-08-08 12:30:19 -07:00
..
dashboard_auth
…
observability Merge updated client resource metrics into active-install metrics 2026-08-04 15:10:41 -07:00
proxy
…
subcommands Port from superagent-ai/grok-cli: verify subsystem (run-recipe detection + environment manifest + hermes verify smoke runner) 2026-08-07 10:11:05 -07:00
web_routers perf(dashboard): keyset pagination for streaming session export 2026-08-08 13:36:08 +05:30
__init__.py chore: release v0.20.0 (2026.8.3) 2026-08-03 09:57:23 -07:00
_early_recovery.py
…
_parser.py feat: --resume latest keyword and --in DIR launch flag 2026-08-08 04:03:41 -07:00
_scan_venv_blockers.py fix(desktop): use the canonical gateway matcher for the preflight exemption 2026-07-31 22:34:28 -07:00
_startup_fast.py refactor: single chokepoint for the pre-import version fast path 2026-08-02 21:13:12 +05:30
_subprocess_compat.py chore: suppress windows-footgun false positive on gated killpg 2026-08-04 17:33:36 -07:00
active_sessions.py
…
agent_import.py refactor(cli): review follow-ups for the config.yaml import guard 2026-08-02 14:55:32 +05:30
agent_plugins.py fix(plugins): address portable MCP review feedback 2026-08-07 09:44:21 -07:00
approval_mode.py
…
approvals_suggest.py feat(cli): add `hermes approvals test` — dry-run approval verdict CLI 2026-08-07 08:57:39 -07:00
approvals_test.py feat(cli): add `hermes approvals test` — dry-run approval verdict CLI 2026-08-07 08:57:39 -07:00
auth.py fix: show explicit member spend cap message instead of 'no credits' 2026-08-07 19:47:40 +05:30
auth_commands.py
…
azure_detect.py
…
backup.py refactor: consolidate five duplicate byte formatters into hermes_cli.sizefmt 2026-08-08 15:10:35 +05:30
bang_shell.py feat(cli): ! shell mode — run a command without spending a model turn 2026-07-31 21:21:20 -07:00
banner.py fix(cli): route keyless first run into provider onboarding instead of a broken chat 2026-08-01 15:34:16 -07:00
blueprint_cmd.py refactor(cron): polish registration partial-failure surfaces 2026-08-07 17:45:06 +05:30
browser_connect.py
…
build_info.py
…
bundles.py
…
callbacks.py fix(approval): classify CLI/TUI approval timeouts separately from explicit denials 2026-08-02 20:21:59 -07:00
checkpoints.py refactor: fold simplify findings — 6th copy in update_cmd, drop dead wrapper + speculative kwarg, behavior-contract tests 2026-08-08 15:10:35 +05:30
claw.py
…
cli_agent_setup_mixin.py refactor(sessions): accurate scope wording for tip-only resume rejections 2026-08-08 13:36:08 +05:30
cli_billing_mixin.py
…
cli_commands_mixin.py fix(personality): stop writing personality into agent.system_prompt 2026-08-08 14:01:56 -05:00
cli_output.py
…
clipboard.py
…
codex_models.py
…
codex_runtime_plugin_migration.py
…
codex_runtime_switch.py
…
colors.py
…
commands.py fix: post-merge audit follow-ups for #81138/#81139/#81141/#81148 2026-08-08 05:21:09 -07:00
completion.py
…
config.py feat(config): resolve ephemeral prompt from display.personality 2026-08-08 14:01:56 -05:00
config_defaults.py feat(compression): native OpenAI Responses server-side compaction for gpt-5.6 2026-08-08 11:24:45 -07:00
config_migrations.py
…
console_engine.py fix: use is_job_runnable/effective_job_state in remaining pause-check sites 2026-08-08 13:48:00 +05:30
container_boot.py fix(install): support non-pid-1 container entrypoints 2026-08-01 10:52:34 -07:00
context_switch_guard.py
…
copilot_auth.py test: harden cold-start regression tests + debug-log the env-var skip 2026-08-03 21:16:09 +05:30
credential_lifecycle.py
…
cron.py fix(cron): make pause authoritative against half-paused records 2026-08-08 13:48:00 +05:30
curator.py
…
curses_ui.py
…
dashboard_procs.py
…
dashboard_register.py
…
debug.py fix(debug): say where a client-side log lives instead of "(file not found)" (#78687) 2026-08-04 11:53:32 -06:00
default_soul.py
…
dep_ensure.py fix(runtime): resolve Hermes-managed Node and uv before bare PATH 2026-08-01 21:17:51 -04:00
diagnostics_upload.py
…
dingtalk_auth.py
…
doctor.py refactor: fold simplify findings — 6th copy in update_cmd, drop dead wrapper + speculative kwarg, behavior-contract tests 2026-08-08 15:10:35 +05:30
doctor_live.py feat(doctor): add opt-in `hermes doctor --live` real-call backend probes 2026-08-07 09:07:48 -07:00
dump.py feat(gateway): session activity watchdog, stall notify, compress timeout (#72424) 2026-08-02 16:16:36 -07:00
env_loader.py fix(env): make config.yaml authoritative for terminal.backend (#29186) 2026-08-02 18:21:58 -07:00
fallback_cmd.py
…
fallback_config.py fix(auth): resolve fallback api keys through secret_scope, not raw env 2026-07-31 22:35:26 -07:00
focus_view.py
…
gateway.py fix: align helper PID check with Python parser + dedupe drain-wait 2026-08-07 06:55:27 +05:30
gateway_enroll.py
…
gateway_windows.py
…
goals.py feat(goals): quality gates — deterministic commands that must pass before /goal completes 2026-08-05 22:32:39 -07:00
gui_uninstall.py feat(desktop): register a Linux launcher entry for `hermes desktop` 2026-08-05 11:47:05 -04:00
heartbeat.py feat: /heartbeat — recurring session re-entry prompt fired when idle 2026-08-05 22:32:55 -07:00
hooks.py Inspired by Cursor: fail-closed hook semantics + exit-code-2 blocking 2026-08-08 05:02:04 -07:00
init_command.py
…
input_sanitize.py
…
inventory.py
…
journey.py
…
kanban.py
…
kanban_db.py feat(kanban,mcp): orphaned-card reconciliation + per-server MCP identity header 2026-08-07 08:58:20 -07:00
kanban_decompose.py
…
kanban_diagnostics.py
…
kanban_specify.py
…
kanban_swarm.py
…
lifecycle.py
…
linux_desktop_entry.py feat(desktop): register a Linux launcher entry for `hermes desktop` 2026-08-05 11:47:05 -04:00
logs.py
…
main.py feat: --resume latest keyword and --in DIR launch flag 2026-08-08 04:03:41 -07:00
managed_scope.py
…
managed_uv.py fix(update): survive a hermes_constants cached from before the update 2026-08-01 23:06:47 -05:00
mcp_catalog.py fix(catalog): validate http+api_key manifests declare the header's env key 2026-08-03 22:55:36 +05:30
mcp_config.py
…
mcp_picker.py
…
mcp_security.py
…
mcp_startup.py fix(review): harden portable plugin boundaries 2026-08-07 09:44:21 -07:00
mem_trim.py fix(mem): 5s force floor so delegate-batch closes don't stack trims 2026-08-02 22:44:38 +05:30
memory_oauth.py
…
memory_setup.py
…
middleware.py
…
migrate.py
…
moa_cmd.py
…
moa_config.py
…
model_catalog.py perf(model-picker): serve stale model caches instantly, refresh in background 2026-08-01 14:52:18 -07:00
model_cost_guard.py
…
model_normalize.py fix(models): a model id missing its vendor prefix says so instead of 404ing (#78856) 2026-08-04 19:35:57 +00:00
model_search.py
…
model_setup_flows.py
…
model_switch.py perf(model): disk-cache custom-provider /v1/models probes 2026-08-07 21:02:40 +05:30
models.py fix(opencode-go): route gpt-* models to /v1/responses (codex_responses) 2026-08-08 14:47:11 +05:30
nous_account.py fix: show explicit member spend cap message instead of 'no credits' 2026-08-07 19:47:40 +05:30
nous_auth_keepalive.py
…
nous_billing.py
…
nous_subscription.py
…
npm_engine.py Merge branch 'main' into ethie/bundled-node-path-windows-layout 2026-08-01 21:27:26 -05:00
onepassword_secrets_cli.py
…
oneshot.py fix(mcp): ensure MCP discovery completes before agent build in non-interactive sessions 2026-08-01 12:27:31 +05:30
pairing.py
…
partial_compress.py
…
pets.py
…
platforms.py
…
plugins.py fix(plugins): address portable MCP review feedback 2026-08-07 09:44:21 -07:00
plugins_cmd.py feat(plugins): load portable agent components 2026-08-07 09:44:21 -07:00
portal_cli.py
…
profile_describer.py
…
profile_distribution.py refactor(utils): move mode+owner preservation into atomic_write_text 2026-08-06 05:00:17 +05:30
profiles.py refactor: trim verbose comments + drop redundant default_flow_style kwarg 2026-08-05 11:59:33 +05:30
projects_cmd.py
…
projects_db.py
…
prompt_size.py fix(prompt_size): search volatile tier for skills block after the stable->volatile move 2026-08-03 23:23:39 +05:30
prompt_stash.py feat(cli): complete the Ctrl+S prompt stash — keybinding, state machine, tests 2026-07-31 21:21:16 -07:00
provider_catalog.py
…
providers.py feat(providers): add Actual Computer inference provider 2026-08-05 14:08:32 -07:00
proxy_cli.py
…
psutil_android.py
…
pt_input_extras.py
…
pty_bridge.py
…
pty_session.py
…
relaunch.py
…
route_identity.py
…
runtime_provider.py fix: adapt Actual provider salvage to current main 2026-08-05 14:08:32 -07:00
secret_prompt.py
…
secrets_cli.py
…
security_advisories.py
…
security_audit.py fix(security): cache OSV malware preflight verdicts and stop double component discovery (#75485) 2026-08-01 10:47:20 -07:00
security_audit_startup.py
…
send_cmd.py feat(gateway): simplex channel enumeration + show configured platforms in hermes send --list 2026-08-02 15:08:45 -07:00
service_manager.py
…
session_export.py
…
session_export_html.py
…
session_export_md.py
…
session_filters.py
…
session_listing.py fix(gateway): scope session lists before limiting 2026-07-31 22:36:55 -07:00
session_recap.py
…
session_recovery.py fix(state): deduplicate session system prompts 2026-08-03 20:37:17 +05:30
sessions_cmd.py fix(cli): back up state.db before clean-markers writes by default 2026-08-04 11:26:15 +05:30
setup.py fix(runtime): resolve Hermes-managed Node and uv before bare PATH 2026-08-01 21:17:51 -04:00
setup_hidden_env.py
…
setup_whatsapp_cloud.py
…
sizefmt.py refactor: fold simplify findings — 6th copy in update_cmd, drop dead wrapper + speculative kwarg, behavior-contract tests 2026-08-08 15:10:35 +05:30
skills_config.py
…
skills_hub.py refactor: share category detection and prune vendored SKILL.md hits 2026-08-02 13:31:16 +05:30
skin_cmd.py refactor: trim verbose comments + drop redundant default_flow_style kwarg 2026-08-05 11:59:33 +05:30
skin_engine.py
…
slack_cli.py
…
slash_exec.py
…
sqlite_runtime.py
…
sqlite_safe_read.py fix(cli): untrack sqlite connections only after close succeeds 2026-07-31 23:18:12 -07:00
sqlite_util.py
…
status.py feat(cli): global emergency stop — `hermes pause` / `hermes resume` 2026-08-07 08:58:14 -07:00
stdio.py
…
suggestions_cmd.py refactor(cron): polish registration partial-failure surfaces 2026-08-07 17:45:06 +05:30
telegram_managed_bot.py
…
timefmt.py chore: round-2 review nits (re-review #9) 2026-08-02 16:16:36 -07:00
timeouts.py
…
tips.py fix(gateway): defer in-band restart until active turns finish (#77184) 2026-08-03 09:57:58 +05:30
tools_config.py fix(tools): reuse subscription features for toolset listing 2026-08-03 16:07:16 +05:30
toolset_validation.py
…
uninstall.py refactor(utils): move mode+owner preservation into atomic_write_text 2026-08-06 05:00:17 +05:30
update_cmd.py fix(update): handle UnicodeDecodeError in interactive update prompts 2026-08-08 12:30:19 -07:00
update_lock.py fix(update): make the ancestor-PID lock handoff cross-platform via psutil 2026-07-31 22:28:46 -07:00
urllib_security.py
…
vercel_auth.py
…
verify_cmd.py Integrate verify subsystem with the existing verification stack 2026-08-07 10:11:05 -07:00
voice.py fix(tts): split long speech by provider and platform limits 2026-08-08 22:54:20 +05:30
web_deps.py
…
web_git.py
…
web_models.py feat(profiles): REST export/import + extra_files overlay hook 2026-08-04 12:07:29 -06:00
web_server.py fix(dashboard): close config-RMW gaps left by the off-loop sweep 2026-08-08 13:28:28 +05:30
webhook.py
…
win_pty_bridge.py
…
windows_ssh_runtime.py fix(desktop): keep Windows SSH runtime at machine root 2026-08-01 14:30:16 -07:00
write_approval_commands.py
…
xai_retirement.py refactor(utils): move mode+owner preservation into atomic_write_text 2026-08-06 05:00:17 +05:30