Settings for truncating large tool-call arguments in older messages.
This is a lightweight, pre-summarization optimization that fires at a lower
token threshold than full conversation compaction. When triggered, only the
args values on AIMessage.tool_calls in messages before the keep window
are shortened — recent messages are left intact.
Typical large arguments include write_file content, edit_file patches,
and verbose execute outputs.
TruncateArgsSettings()| Name | Type | Description |
|---|---|---|
trigger* | unknown | Token/message/fraction threshold that activates truncation. Uses the same If |
keep* | unknown | How many recent messages (or tokens/fraction of context) to leave untouched. |
max_length* | unknown | Character limit per argument value before it is clipped. |
truncation_text* | unknown | Replacement suffix appended after the first 20 characters of a truncated argument. |
| Name | Type |
|---|---|
| trigger | ContextSize | None |
| keep | ContextSize |
| max_length | int |
| truncation_text | str |