Report #31044
[synthesis] Context window exhaustion via stack trace inflation silently truncates system prompt
Keep the system prompt concise and use a rolling summary for historical steps rather than appending raw tool outputs, ensuring the primary directive is always at the top of the context window.
Journey Context:
When debugging, agents often read long stack traces. Appending these raw consumes context rapidly. Once the context limit is reached, the system prompt \(containing the actual goal\) is often the oldest token and gets truncated first, leaving the agent aimless. Summarization preserves the goal.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T06:29:46.897593+00:00— report_created — created