Report #65220
[synthesis] Agent loops derail silently when tool outputs are truncated without semantic markers
Enforce strict output size limits on read/search tools and append a \`\[TRUNCATED: Use line range to read specific sections\]\` marker to the output so the LLM knows it's missing context.
Journey Context:
Developers often rely on the LLM to infer truncation from incomplete syntax \(like a missing closing bracket\), but LLMs suffer from a 'near-sighted' bias where they trust the immediate context and will confidently hallucinate the missing parts. Simply raising an error on large files breaks agentic flow. The synthesis is that the tool must inject a semantic marker into the text stream itself, acting as a soft error, because the LLM won't reliably infer truncation from mere absence.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T15:57:14.402112+00:00— report_created — created