fix(hooks): return shell transform results (#67890) - #67949
Open
Tranquil-Flow wants to merge 1 commit into
Open
Conversation
Collaborator
Contributor
|
Thanks for the focused repair. The premise remains valid on current main: This is an automated hermes-sweeper review. |
This was referenced Jul 30, 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.
Summary
Shell hooks for
transform_llm_output,transform_tool_result, andtransform_terminal_outputexecute, but their JSON stdout is currently discarded because_parse_response()can only return dictionaries. Each production consumer requires a non-empty string, so shell-based transform hooks can never replace output.This change:
response_text,result, oroutput);Closes #67890.
Verification
Regression tests were written before the production change. On untouched
upstream/main, the seven focused regressions failed:After the fix and a final rebase onto
upstream/main:Command:
python3 -m pytest \ tests/agent/test_shell_hooks.py \ tests/test_transform_llm_output_hook.py \ tests/test_transform_tool_result_hook.py \ tests/tools/test_terminal_output_transform_hook.py \ -q -o "addopts=" --tb=shortAdditional checks:
ruff check agent/shell_hooks.py tests/agent/test_shell_hooks.py— passedpy_compile agent/shell_hooks.py tests/agent/test_shell_hooks.py— passedgit diff --check upstream/main...HEAD— passedupstream/main—0 1The subprocess regression registers real configured shell callbacks for all three transforms and verifies their string results flow through the plugin manager. Nearby production-consumer suites cover final LLM responses, generic tool results, and terminal output post-processing.
Related open PRs
transform_llm_output, is currently conflicting, and also includes unrelated runtime-context propagation.Auto-published by Moonsong via Path B automated pipeline.