Skip to main content

Module result_reducers

Module result_reducers 

Source
Expand description

Token-efficient tool result reducers.

When tool results are too large for the context window, reducers truncate them to keep only high-signal information. This follows the context engineering principle: “return only summaries or a small number of results to the model.”

Functions§

project_model_tool_result
Project an indexed tracker update without repeating unchanged task details. Full results remain available to persistence, events, and explicit list calls.
reduce_tool_result
Reduce a tool result to be more token-efficient.
strip_tui_display_fields
Strip TUI-only display fields from a tool result before it enters model context.
truncate_lines