Skip to content

Spill oversized tool results without a name allowlist - #872

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7618-materialize-leisure-on-all-tool-results-not-an-allowlist
Sep 10, 2026
Merged

Spill oversized tool results without a name allowlist#872
TheGreatAxios merged 2 commits into
mainfrom
cl-7618-materialize-leisure-on-all-tool-results-not-an-allowlist

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

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_TOOLS is gone. Gate is isError plus size. Shell/file leisure algorithm is unchanged.
  • Inline result is a short preview plus tool-output:///{callId}:full. The blob recovers pretty JSON (minified fleet) or original text.
  • Getters are live: wrap with getBlobWriter / getContextDir, assign the writer after createSessionStores, then oversized nested wait_agents spills instead of NOT retrievable.
  • Error results skip materialization.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • bun run check passes
  • bun test src/plugins/result-truncation-plugin.test.ts covers fleet-shaped JSON over budget, fetchable URI, late-bind writer, and isError skip

Fixes CL-7618

@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

CL-7618

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
TheGreatAxios force-pushed the cl-7618-materialize-leisure-on-all-tool-results-not-an-allowlist branch from 47415d1 to 9aa2ab7 Compare September 10, 2026 14:51
@TheGreatAxios
TheGreatAxios merged commit 7267001 into main Sep 10, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant