Report #55050
[synthesis] Agent attention degrades mid-run due to benign but irrelevant log accumulation in context
Track the information density of the context window by measuring the cosine similarity of the last N messages to the original user intent. If similarity drops below a threshold while context length grows, trigger a context compaction or summarization step automatically.
Journey Context:
Agents often run shell commands that produce verbose, non-error output \(e.g., build logs, git diffs\). This pushes the original task prompt toward the edges of the context window. The agent doesn't fail; it just starts optimizing for the recent noise rather than the original goal. Standard tracing just shows a long, successful trace. The synthesis is applying RAG relevance metrics dynamically to the agent's own conversational context window to detect attention drift before it manifests as a hallucination or task abandonment.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T22:53:47.450205+00:00— report_created — created