Source: Preliminary findings from the JetBrains Developer Ecosystem Survey 2026 • 15,000+ developers worldwide

Failure Type
Symptoms
Mitigation Strategy
Lost information
Agent repeats completed work and forgets earlier decisions
Pin critical outputs and use structured state tracking
Context overload
Slow responses, incoherent reasoning, and ignored instructions
Trim aggressively and enforce per-section token budgets
Validate retrieved chunks before injection and refine query logic
Agent references unrelated code or documentation
Irrelevant retrieval
Timestamp context items and invalidate on state changes
Deduplicate before assembly and normalize retrieved chunks
Set hard token limits and summarize aggressively past thresholds
Agent uses outdated file versions or superseded decisions
Same content appears multiple times, wasting tokens
Costs spike and latency climbs mid-workflow
Stale context
Duplicated information
Excessive token consumption
Refresh frequency follows workflow length and volatility. A short task usually runs fine on a single well-structured context. Longer workflows want a refresh at major branch points, like when the task shifts, after a discrete subtask closes, or when utilization crosses a threshold you set. Some teams refresh on a fixed interval every N steps, while others trigger it programmatically from the utilization signal.
Three levers carry most of the savings. Retrieve selectively, pulling only the chunks the current step needs. Replace verbatim history with compact summaries wherever exact wording is not required. Keep a memory layer that persists across sessions, so the agent is not paying to re-derive the same background on every invocation.
Trimming is subtractive, and summarization is compressive, and that difference decides which one you reach for. Trimming usually avoids an extra model call, which makes it the cheaper of the two, but whatever it drops is unrecoverable. Summarization survives a later reference to the material it compressed, at the price of an extra model call and some loss of fidelity. Most production systems trim the obviously dead weight and summarize anything that might still be needed downstream.
Latency climbs, costs rise, and accuracy tends to fall. Models may use information in very long contexts unevenly, particularly when relevant material sits buried in the middle, and can produce inconsistent output as the window fills. Enlarging the window is the intuitive fix and often the wrong one, since it treats the symptom while trimming and summarization address the cause.
Split when the task has natural subtask boundaries, and one step's output becomes the next step's focused input. A monolithic prompt carrying every requirement, all the code, and the full history usually performs worse than a pipeline where each step sees a clean, relevant subset. Cramming everything into one prompt to avoid losing context is itself the signal that the task needs decomposing.
Damaso Sanoja is an engineer who is passionate about helping others make data-driven decisions to achieve their goals. This has motivated him to write numerous articles on the most popular relational databases, customer relationship management systems, enterprise resource planning systems, master data management tools, and, more recently, data warehouse systems used for machine learning and AI projects. You can blame this fixation on data management on his first computer being a Commodore 64 without a floppy disk.
Continue Exploring the AI Agents for Developers Guide
Explores AI agent architecture, including core components, planning, memory, tool use, orchestration, and design patterns for building reliable AI agents.
Learn how AI agent orchestration works, from planning and task routing to state management, multi-agent coordination, and reliable workflow execution.
Explains agentic workflows, how AI agents plan and execute multistep tasks, and the patterns that make autonomous workflows reliable and scalable.