fix(tui): decode startup subprocess output as utf-8 - #43790
Closed
helix4u wants to merge 1 commit into
Closed
Conversation
helix4u
marked this pull request as ready for review
June 10, 2026 22:00
helix4u
marked this pull request as draft
June 10, 2026 22:02
helix4u
marked this pull request as ready for review
June 10, 2026 22:03
Contributor
Code Review VerificationReviewed the diff (8 lines production across 4 call sites + 61 lines test). The fix is correct:
No issues found. Clean defensive fix. |
teknium1
added a commit
that referenced
this pull request
Jun 11, 2026
Contributor
|
Merged via #44328 — your commit was cherry-picked onto current main with your authorship preserved (rebase-merge). We added one follow-up on top covering the same bug class in the WhatsApp bridge npm install capture. Thanks! |
alt-glitch
pushed a commit
that referenced
this pull request
Jun 14, 2026
AIalliAI
pushed a commit
to AIalliAI/Hermes
that referenced
this pull request
Jun 14, 2026
T02200059
pushed a commit
to T02200059/hermes-agent
that referenced
this pull request
Jun 18, 2026
xyshanren
pushed a commit
to xyshanren/hermes-agent-cn
that referenced
this pull request
Jun 25, 2026
waefrebeorn
pushed a commit
to waefrebeorn/slermes
that referenced
this pull request
Jul 2, 2026
santhreal
pushed a commit
to santhreal/hermes-agent
that referenced
this pull request
Jul 13, 2026
donbowman
pushed a commit
to donbowman/hermes-agent
that referenced
this pull request
Jul 13, 2026
Gravezzz
pushed a commit
to Gravezzz/hermes-agent
that referenced
this pull request
Jul 21, 2026
leewenjie
pushed a commit
to leewenjie/hermes-agent
that referenced
this pull request
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fixes a Windows TUI startup crash/noisy traceback path where captured
npmsubprocess output was decoded with the process default ANSI code page. On Windows, that can surface aUnicodeDecodeErrorfrom Python's internalsubprocess._readerthreadbefore the TUI finishes launching.The TUI launcher now uses explicit UTF-8 decoding with replacement for the captured node/bootstrap and npm build/install calls. That keeps startup from printing a Python thread traceback when npm/node emits bytes outside the active Windows code page.
Related Issue
Fixes #
Type of Change
Changes Made
hermes_cli/main.py: addencoding="utf-8", errors="replace"to TUI startup subprocess captures:npm installnpm run buildtests/hermes_cli/test_tui_npm_install.py: assert the TUI launcher npm captures use the explicit decode policy.How to Test
python -m py_compile hermes_cli/main.py tests/hermes_cli/test_tui_npm_install.pygit diff --check -- hermes_cli/main.py tests/hermes_cli/test_tui_npm_install.py.venv/bin/pythonlauncher probe for normal build, install-plus-build, and dev prebuild passed.UnicodeDecodeError: 'charmap' codec can't decode byte 0x8fstartup traceback fromhermes --tui.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AFor New Skills
hermes --toolsets skills -q "Use the X skill to do Y"— N/AScreenshots / Logs
Reported Windows startup traceback:
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8f ... subprocess.py ... _readerthread ... buffer.append(fh.read())