← Back to PRs

#17950: fix: filter error payloads from user-facing messages

by Suksham-sharma open 2026-02-16 10:12 View on GitHub →
stale size: XS
## Summary - `isRenderablePayload()` did not check the `isError` flag on payloads - Internal error results (context overflow, tool failures, role ordering conflicts) were being sent to users on all messaging channels - These errors are meant to stay in the agent context for self-correction, not be delivered to end users ## Changes - Added early return in `isRenderablePayload()` when `payload.isError` is true - Added test coverage for `isRenderablePayload` covering all payload types and the isError filtering Fixes #17828 <!-- greptile_comment --> <h3>Greptile Summary</h3> Prevents internal error messages from being sent to end users by filtering out error payloads. The fix adds an early return in `isRenderablePayload()` to check the `isError` flag, ensuring that context overflow errors, tool failures, and role ordering conflicts stay in the agent context for self-correction rather than being delivered on messaging channels. <h3>Confidence Score: 5/5</h3> - This PR is safe to merge with minimal risk - The fix is a simple, well-tested guard clause that prevents a clear bug (error messages leaking to users). The change is minimal, isolated to a single function, and includes comprehensive test coverage. No edge cases or regressions identified. - No files require special attention <sub>Last reviewed commit: b981813</sub> <!-- greptile_other_comments_section --> <!-- /greptile_comment -->

Most Similar PRs