docs: document multi-entry compress format in system prompt and T2/T3 nudge - #259
Merged
Merged
Conversation
ranxianglei
force-pushed
the
2026-08-01_t2-batch-suggestions
branch
4 times, most recently
from
August 2, 2026 02:19
7ffb12e to
31f6dbb
Compare
ranxianglei
force-pushed
the
2026-08-01_t2-batch-suggestions
branch
from
August 2, 2026 03:27
31f6dbb to
b35b7be
Compare
This was referenced Aug 2, 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.
Summary
The compress tool supports two usage modes: single entry and multiple entries (
contentarray). The system prompt already documented both for message-based compression, but only showed single-entry for block-based (T2/T3) compression. The T2/T3 trigger nudge also only showed single-entry.When 70+ T1 blocks accumulated (issue #256), the model only knew the single-entry format and tried to compress everything into one summary — risking
maxSummaryLengthHardoverflow.Fix
Document both formats in two places:
system.ts): Added multi-entry example to MULTI-TIER COMPRESSION sectioninject.ts): Added multi-entry format alongside the single-entry suggestionNo threshold hints — the model decides how to split based on block sizes and topics.
Files
lib/prompts/system.ts: added batch format example (1 line)lib/messages/inject/inject.ts: added multi-entry format to tier trigger text (1 line)No code logic changes. 942 tests pass.