Report #70897
[synthesis] Context poisoning cascades across steps when reading truncated files
Always append a truncation warning token \(e.g., '\[TRUNCATED - X bytes remaining\]'\) to the end of file-read tool outputs if the file exceeds the context window limit, and explicitly instruct the agent in the system prompt that it must use a read-line tool or search tool to find the rest of the file.
Journey Context:
Developers limit file read outputs to prevent context overflow, but fail to signal the truncation to the LLM. The LLM assumes it has the complete file, makes modifications based on the partial view \(e.g., deleting seemingly unused imports at the top\), and saves the file, destroying the unseen code. The synthesis is that context window management is not just a token limit, but a state-consistency problem. Without explicit truncation markers, partial success masks total failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T01:34:30.677172+00:00— report_created — created