Context Engineering · Overview

1. Context Windows: 上下文窗口、Token 限制、Context Rot、长上下文管理 https://platform.claude.com/docs/en/build-with-claude/context-windows ↓ 2. Context Engineering in Agents: Agent 上下文工程、Model Context、Tool Context、生命周期上下文、Summarization、Memory https://docs.langchain.com/oss/python/langchain/context-engineering ...

上下文工程
2026-09-061 分钟486 字chenghaoning51

Context Management · Compaction

Compaction Server-side context compaction for managing long conversations that approaching context window limits 1 Server-side compaction is the recommended strategy for managing context in long-running conversations and agentic workflows. It handles context management automatically, without client-side summarization code. as a conversation grows, response quality degrades,Compaction extends the effective context length for long-running conversations and tasks compaction replaces older content with a concise summary. This is ideal for: Chat-based, multi-turn conversations where you want users to use one chat for a long period of time Task-oriented prompts that require a lot of follow-up work (often tool use) that might exceed the context window How compaction works four steps: ...

上下文工程
2026-09-065 分钟2022 字chenghaoning51

Context Management · Context Windows

Context windows Understand how the context window works, how extended thinking and tool use count toward it, and how to manage context as conversations grow. the primary strategy is server-side-compaction How the context window works what is the context window: The “context window” refers to all the text a language model can reference when generating a response, including the response itself. https://platform.claude.com/docs/images/context-window.svg As token count grows, accuracy and recall degrade, a phenomenon known as context rot. ...

上下文工程
2026-09-062 分钟860 字chenghaoning51

Context Management · Context Editing

Context editing Automatically manage conversation context as it grows with context editing 注意断句 Overview The strategies on this page are useful for specific scenarios where you need more fine-grained control over what content is cleared. 更适用于在特定场景中,你需要清楚哪些内容进行更加细粒度的控制 Context editing allows you to selectively clear specific content from conversation history as it grows. Beyond optimizing costs and staying within limits, this is about actively curating what Claude sees: context is a finite resource with diminishing returns, and irrelevant content degrades model focus. Context editing gives you fine-grained runtime control over that curation. For the broader principles behind context management, see Effective context engineering. ...

上下文工程
2026-09-062 分钟791 字chenghaoning51