fix(tui): show read-tool failures with error evidence - #570
Merged
Merged
Conversation
This was referenced Sep 19, 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.
Problem
Fixes #569.
Native Pi tool failures reach these read-only tools with
isError: true, but their TUI renderers ignored that flag.fd/rgcan show undefined counts or empty results, andgit_show/git_diff/git_logcan show success labels for failed reads.Value
Operators can distinguish a genuine empty search from a failed command without losing the reason for failure.
Approach
Check the native renderer context's
isErrorbefore the normal success/partial paths. Show a failure label and reuse the existing sanitized, bounded 20-line preview. Apply the same projection invariant to all five sibling tools in one PR.Tool execution, canonical output, parameters, and resource handling are unchanged. This is independent of the shared-process refactor in #368 and the revision/path boundary fix in #564.
Validation
ToolExecutionComponent: missing binary, invalid regex and unknown Git revision fixtures reproduced false success; corrected output reports failure.bun run check,git diff --check— pass.Impact