Return less
Cap tool output
A single chatty tool response can fill the window. Coding agents and SDKs let you cap how many tokens one tool result may return, or reshape the result before the model sees it, so one broad list call can't crowd out the rest of the task.
Where it fits
Building my own agent Fits
Reshape results with toModelOutput in the Vercel AI SDK.
Using a coding agent Fits
MAX_MCP_OUTPUT_TOKENS, tool_output_token_limit.
Using an enterprise assistant Not available
No setting exposed.
Using a workflow tool Not confirmed
Cap history and output in Make.
The setting in each harness
Read on each vendor's own page, linked next to the setting.
| Harness | Setting |
|---|---|
| Vercel AI SDK |
|
| Claude Code |
|
| Codex | tool_output_token_limitlearn.chatgpt.com, read 30 Nov 2026 |