Skip to content

Gate tool-output URI reads on named truncation notices - #865

Merged
TheGreatAxios merged 2 commits into
mainfrom
cl-7617-only-prompt-read_file-of-a-uri-when-truncation-named-one
Sep 10, 2026
Merged

Gate tool-output URI reads on named truncation notices#865
TheGreatAxios merged 2 commits into
mainfrom
cl-7617-only-prompt-read_file-of-a-uri-when-truncation-named-one

Conversation

@TheGreatAxios

@TheGreatAxios TheGreatAxios commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

The parent harness facts and the read_file catalog tell the model to read_file a tool-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_agents already returned the full JSON and the parent immediately re-fetched the same one-line blob.

  • Harness: "Only read_file a tool-output:// URI if the truncation notice on that result named one; do not re-read a complete inline result."
  • Catalog read_file summary uses the same gate (truncation notice named one).
  • Tests pin those exact phrases so /named/i cannot pass on unrelated "named specialists" copy.
  • Runtime truncation is unchanged: over-cap results still name a URI; under-cap results still do not.

Verification

  • bun run typecheck, bun run build, and bun run test pass
  • bun run check passes
  • bun test src/prompts.test.ts pins the named-notice phrases on harness facts and the catalog

Fixes CL-7617

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.
@linear-code

linear-code Bot commented Sep 10, 2026

Copy link
Copy Markdown

CL-7617

Loose /named/i matchers still passed if the URI sentence dropped
"named one", because harness facts already mention named specialists.
@TheGreatAxios
TheGreatAxios merged commit 6ba2a96 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