Spill oversized tool results without a name allowlist - #872
Merged
TheGreatAxios merged 2 commits intoSep 10, 2026
Merged
Conversation
Fleet verbs are AgentTools and never entered the posix truncation plugin, so an allowlist of posix names could not cover wait_agents or search_agents. Leisure now applies to every non-error result over the gate, and the same helper wraps AgentTools at mount.
Nested tools wrap before the child session store exists. Live getters bind the writer after createSessionStores so oversized fleet and web results spill to a fetchable tool-output URI instead of a no-store notice.
TheGreatAxios
force-pushed
the
cl-7618-materialize-leisure-on-all-tool-results-not-an-allowlist
branch
from
September 10, 2026 14:51
47415d1 to
9aa2ab7
Compare
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
Leisure materializes every non-error tool result over the size budget, not a named allowlist of shell and file tools. Fleet AgentTools are wrapped at primary and nested mount; nested overflow late-binds a blob writer so the spill URI is fetchable.
Fleet JSON (
wait_agents,list_agents,search_agents, lifecycle tools) used to skip truncation, so a parent that waited on a worker report got one giant JSON line and no URI. Nested workers wrapped tools before the session blob store existed, which produced a no-store notice.TRUNCATABLE_TOOLSis gone. Gate isisErrorplus size. Shell/file leisure algorithm is unchanged.tool-output:///{callId}:full. The blob recovers pretty JSON (minified fleet) or original text.getBlobWriter/getContextDir, assign the writer aftercreateSessionStores, then oversized nestedwait_agentsspills instead ofNOT retrievable.Verification
bun run typecheck,bun run build, andbun run testpassbun run checkpassesbun test src/plugins/result-truncation-plugin.test.tscovers fleet-shaped JSON over budget, fetchable URI, late-bind writer, andisErrorskipFixes CL-7618