docs(compression): the pressure pass truncates inside the protected tail; dispatched calls are never altered (#105574) - #115988
Merged
kshitijk4poor merged 1 commit intoSep 19, 2026
Conversation
`configuration.md` promised that argument truncation protects the most recent `protect_last_n` messages. Pass 4 (`_pressure_demote_tail`, NousResearch#61932) does not honour that promise: whenever the protected tail alone exceeds 1.5x its token budget it demotes tool results and truncates tool-call arguments inside the tail, and it runs on every compaction regardless of `proactive_prune_tokens`. State that, and state the boundary that matters for NousResearch#105574: both passes rewrite the history copy only — tool execution reads arguments from the provider's response object (`agent/tool_executor.py`) and a resumed dangling tool-call tail is stripped or stubbed by `agent/replay_cleanup.py` before it can be re-sent — so a dispatched call's arguments are never changed by compression. Docs half of NousResearch#105598 by @Halldrix (request 4 of NousResearch#105574). Co-authored-by: Halldrix <12357213+Halldrix@users.noreply.github.com>
This was referenced Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
configuration.mdsaid argument truncation protects the most recentprotect_last_nmessages. It does not: Pass 4 (_pressure_demote_tail, #61932) truncates tool-call arguments and demotes tool results inside the protected tail whenever that tail alone exceeds 1.5× its token budget, and it runs on every compaction regardless ofproactive_prune_tokens. The sentence now says so, and states the boundary that decides #105574: both passes rewrite the history copy the model re-reads only.Why docs and not the exemption in #105598 (#105574, @ackellerman): the report's mechanism — a just-built
delegate_taskdispatch clipped to 200 chars before reaching its subagents — has no path onorigin/main:agent/tool_executor.py::_execute_tool_calls_sequential), never from history, and_execute_tool_callsruns beforecompress_after_tool_results(agent/turn_tool_round.py).agent/replay_cleanup.py::canonicalize_replay_historyviaturn_context,gateway/run.py,tui_gateway); a trailing unansweredassistant(tool_calls)is stripped (read-only) or stubbed UNKNOWN (side-effecting). It is never re-dispatched, so truncating its args in history changes what the model reads, not what any child receives.What produces the observed
...[truncated]in a child is the model copying clipped JSON from history into a new call — the marker-imitation class tracked by #83843 / #83735 / #87217 / #83435.One line in
website/docs/user-guide/configuration.md. Request 4 of the issue; Co-authored-by @Halldrix, whose #105598 carried the docs sentence. Refs #105574.