agent: Truncate bash tool output (#28291)

The bash tool will now truncate its output to 8192 bytes (or the last
newline before that).

We also added a global limit for any tool that produces a clearly large
output that wouldn't fit the context window.

Release Notes:

- agent: Truncate bash tool output

---------

Co-authored-by: Michael Sloan <mgsloan@gmail.com>
85c5d8af3aAgus Zubiaga committed on 4/8/2025, 4:55:35 PM· committed by GitHubparent1774cad
4 files changedLine totals unavailable