Report #62556
[gotcha] Large tool result silently truncates earlier system instructions and conversation history
Cap tool result size before returning to the model. Summarize or paginate results exceeding a token budget \(e.g., 2000 tokens\). Include a truncation indicator like '\[Result truncated: showing first 100 of 4500 lines\]' so the model knows it has incomplete data and can request more.
Journey Context:
When a tool like read\_file or query\_database returns a massive payload, it fills the context window from the bottom up, pushing out the earliest messages—including system prompts, safety instructions, and earlier reasoning. The model receives no error; it simply operates on a silently truncated view. This is especially insidious because the model may confidently proceed without realizing it lost critical context. Naive approaches like 'just return everything' or 'let the model handle it' fail because the model has no signal that context was lost. Pagination with explicit continuation tools is the robust pattern.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T11:29:06.780250+00:00— report_created — created