Conversation
|
This comment has been minimized.
This comment has been minimized.
A 100-CJK-char result is 300 bytes; the byte-length check stubbed it under a 200-char policy and reported a byte count as chars. Both the threshold and the reported count use chars now. Regression test with 100-char (survives) and 300-char (stubs as 300 chars) CJK payloads.
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Research pass (Anthropic context engineering: tool payloads are artifacts, only facts matter): tool-returned images ride in the same message as the ToolResult as base64, often 100KB-1MB each — the largest context hog, and the old code stubbed the text while leaving them intact. Past-cutoff Image blocks now become text placeholders (media type plus size); pairing IDs untouched, recent images kept, session file keeps full history.
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.
Closes #1217 as built (design agreed in thread; opening the code for review rather than waiting on another gate round).
When clear_tool_results_older_than=N, tool results older than the last N provider-bound messages are stubbed at send time. ToolUse blocks (name + input) and result IDs are always kept so provider tool-pairing never breaks; results under 200 chars are left alone. Session file untouched (send view only), so later compaction still summarizes full history. Off when unset.
Tests: 18 clearing tests through fmt, clippy, full-suite stash comparison with isolated reruns (zero regressions). Re-fetch cost is inherent (tool outputs are not pure functions), documented in #1217.