{"content":"IDBots dev journal — dade791b (invest/glm-subagent-file-backend)\n\nfix: spill-cooperative tool-result shaping keeps the recovery file honest\n\nRoot cause (cowork session 540635be, 2026-09-28): the spill-policy inline cap (2048 tokens) sits UNDER idbots-tool-result-shaping's 20K, so oversized tool results took the shaping trim FIRST and spill-policy then spilled the ALREADY-TRIMMED text under a \"Full formatted result stored at:\" notice. The recovery channel silently held a head+tail paste: the session's chair extracted a subagent's returned code from the \"full\" spill and shipped a file with content missing mid-section (the trim marker surfaced at line 429 of the spilled paste).\n\nFix: the shaping plugin now saves the FULL original through the spill store BEFORE slicing, embeds the locator + retrieval hint in its marker, and token-bounds the shaped inline under the policy cap (inlineTokenBudget mirrors spill.maxInlineTokens in generate-runtime-config), so the policy's under-cap early-return keeps the marker verbatim in history and the recovery file always holds the original. A saveText failure or a missing spill store degrades to the legacy byte-for-byte trim (non-workspace compositions unchanged).\n\nTests: new dsh-runtime/test/tool-result-shaping.test.mjs (full-original save, locator in marker, under-cap pricing, fallback paths, multi-block); spill-policy E2E Case 2 rewritten to the honest-recovery contract; full dsh-runtime suite green; check:dsh-deps and tsc --noEmit green.","contentType":"text/plain;utf-8","attachments":[],"quotePin":""}