fix: relaunch chat in a fresh process when setup leaves stdin dirty - #6415
Closed
who96 wants to merge 1 commit into
Closed
fix: relaunch chat in a fresh process when setup leaves stdin dirty#6415who96 wants to merge 1 commit into
who96 wants to merge 1 commit into
Conversation
This was referenced Apr 28, 2026
3 tasks
Contributor
|
Closing as stale — the code path this addresses no longer exists on Triage notes (high confidence): If this PR's intent is still relevant against the current code, please rebase or open a fresh PR. (Bulk-closed during a CLI PR triage sweep.) |
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.
Summary
OSErrorwitherrno == 22inhermes_cli/setup.py::_offer_launch_chat()os.execvp(...)sohermes chatstarts in a fresh process with clean stdio stateOSErrorsWhat did NOT change
cmd_chat(...)path still runs when chat starts cleanlyUser-visible changes
Launch hermes chat now?no longer crashes on the known stdin-selector failure pathStarting chat in a fresh session...and relaunches chatCompatibility / Security impact
OSError(22, ...)path is hitTest plan
pytest tests/hermes_cli/test_setup.py -k offer_launch_chat_reexecs_after_oserror -qpytest tests/hermes_cli/test_setup.py -k offer_launch_chat_reraises_unrelated_oserror -qpytest tests/hermes_cli/test_setup.py -k 'binary_missing or binary_exec_fails' -qpytest tests/hermes_cli/test_setup.py -qpytest tests/ -vEvidence / Actual results
14 passed in 2.02s4 passed in 1.35s28 failed, 9355 passed, 31 skipped, 1 xpassedorigin/mainbaseline:28 failed, 9351 passed, 31 skipped, 1 xpassedLaunch hermes chat now?, acceptedy, and launched chat TUI without the selector crash/tmp/hermes-pr1-hv.XOBmqlHuman verification
Completed in a real TTY against an isolated temp profile:
HERMES_HOME=/tmp/hermes-pr1-hv.XOBmqlhermes setupin the temp venvLaunch hermes chat now?yWelcome to Hermes Agent! Type your message or /help for commands.What was verified:
What was not verified:
Risks / rollback
OSErrors are re-raised instead of triggering a relaunchhermes_cli/setup.pyandtests/hermes_cli/test_setup.py