Gate tool-output URI reads on named truncation notices - #865
Merged
TheGreatAxios merged 2 commits intoSep 10, 2026
Merged
Conversation
The prompt always preferred a tool-output URI over re-reading huge blobs, so complete inline wait_agents results were re-read. Only invite that read when a truncation notice named a URI.
Loose /named/i matchers still passed if the URI sentence dropped "named one", because harness facts already mention named specialists.
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 parent harness facts and the
read_filecatalog tell the model toread_fileatool-output://URI only when that result's truncation notice named one. A complete inline result is not an invitation to invent or re-read a URI that may not exist.This stops the stall where
wait_agentsalready returned the full JSON and the parent immediately re-fetched the same one-line blob.read_filesummary uses the same gate (truncation notice named one)./named/icannot pass on unrelated "named specialists" copy.Verification
bun run typecheck,bun run build, andbun run testpassbun run checkpassesbun test src/prompts.test.tspins the named-notice phrases on harness facts and the catalogFixes CL-7617