跪拜 Guibai
← All articles
Frontend · Agent · AI Programming

Agent Responses Slowing Down? The Problem Isn't the Model, It's Context Bloat

By JacksonChen ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Context bloat is the silent killer of agent reliability in production workflows. Teams that treat every session as an infinite chat log will hit slower cycles and more misaligned outputs, while those that structure context with summaries, skills, and scoped sessions get consistent performance from the same model.

Summary

Every call an AI coding agent makes bundles system prompts, chat history, code files, tool outputs, and project rules into a single context payload. As a session runs, that payload balloons with stale information from earlier tasks. The model must re-process the entire environment on each turn, which slows responses, increases detail loss, and causes cross-task confusion. A larger context window doesn't solve this; it provides capacity but not efficiency, much like searching a 2,000-page book for one fact.

Three practical disciplines keep context lean. Confine each feature to its own conversation so sessions stay task-scoped. After completing a phase, ask the agent for a summary and use that as the starting point for the next round instead of carrying dozens of chat turns. Extract repeatable workflows into Skills, AGENTS.md files, or project rules so the agent loads instructions on demand rather than re-reading them from history every time.

When a bug is already localized to a module, direct the agent to the specific file or snippet instead of letting it scan the whole repository. Focused input cuts noise and makes the real requirement easier for the model to grasp. A clean, relevant context consistently outperforms a long, noisy one.

Takeaways
Context is not just chat history; it bundles system prompts, code, tool outputs, memory, and rules into a single payload the model must re-process on every turn.
Context grows because each completed task adds new information that never automatically disappears, layering history, code reads, and tool results into subsequent calls.
More context does not mean better results; irrelevant history increases comprehension cost, leading to slower replies, missed details, and task confusion.
A large context window provides capacity but not efficiency; the model still spends effort locating relevant information inside a massive payload.
Keep one feature per conversation so each session stays scoped and clean instead of mixing unrelated tasks.
After a phase, ask the agent for a summary and use that as the next starting point rather than carrying dozens of chat rounds forward.
Extract repeatable workflows into Skills, AGENTS.md, or Rules so the agent loads stable instructions on demand instead of re-reading them from chat history every time.
Reduce noise by narrowing scope: when a bug is localized to a module, point the agent at the specific file or snippet rather than the whole project.
Conclusions

Context management is a structural discipline, not a model-selection problem. Two teams using the same model will get radically different long-session reliability depending on how they partition conversations and externalize stable knowledge.

The advice to treat context as a working environment rather than a chat log reframes the agent from a conversational partner into a stateless worker that needs a clean desk for each job. That mental model shift has direct architectural implications for how agent workflows should be built.

Summarization as a context-reset mechanism is underused. A single summary turn can replace dozens of chat rounds, effectively garbage-collecting the context window without losing the semantic thread.

Concepts & terms
Context Window
The maximum amount of text a model can accept in a single request, often measured in tokens (e.g., 128K, 200K, 1M). It defines capacity, not efficiency; a large window can still be filled with noise that degrades output quality.
Skill (in agent workflows)
A packaged, repeatable workflow or instruction set that an agent can invoke on demand. Skills externalize stable knowledge from chat history so the agent loads it only when needed, keeping the context lean.
AGENTS.md / Rules
Project-level configuration files that store persistent instructions, conventions, or workflows for AI coding agents. They move stable guidance out of the chat stream and into a long-term reference the agent reads when relevant.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗