agent: Add terminal output head and tail options (#58257)

Adds optional terminal tool parameters that let agents receive only the
first lines, last lines, or both from a command's final output while
leaving the live terminal output visible to users. This is gated by the
terminal-tail feature flag and updates the tool descriptions to steer
agents away from piping through head, tail, or similar filters.

Closes AI-36

Release Notes:

- Let agents use the terminal tool with builtin "head/tail" so they
don't have to pipe to head/tail and lose incremental output
c0db923b24Richard Feldman committed on 6/1/2026, 8:24:47 PM· committed by GitHubparent799622d
4 files changedLine totals unavailable