講座 › 分野5 コンテキスト管理と信頼性
5.4 大規模コードベース探索の文脈管理
配点 2.5%Large codebase exploration
長い探索では、文脈が劣化する。調査は子に任せ、発見はメモに書き、必要なら圧縮する。
未読
長い探索で、何が起きるか 読了

セッションが長引くと、モデルの答えが一貫しなくなり、前に見つけた具体的なクラスではなく、「よくある型」を引き合いに出すようになります。文脈の劣化の兆候です。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Context degradation in extended sessions: models start giving inconsistent answers and referencing "typical patterns" rather than specific classes discovered earlierhttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
調査は、サブエージェントに任せる 読了

特定の問いの調査は、サブエージェントに出します。長い探索の中身は子の中にとどまり、返るのは短い要約だけです。親は高いレベルの調整に集中できます。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Subagent delegation for isolating verbose exploration output while the main agent coordinateshttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:Effective context engineering for AI agents
Rather than one agent attempting to maintain state across an entire project, specialized sub-agents can handle focused tasks with clean context windows.https://www.anthropic.com/research/effective-context-engineering-for-a…(取得 2026-11-20)
出典:Effective context engineering for AI agents
Each subagent might explore extensively, using tens of thousands of tokens or more, but returns only a condensed, distilled summary of its workhttps://www.anthropic.com/research/effective-context-engineering-for-a…(取得 2026-11-20)
発見は、メモのファイルに書く 読了

重要な発見を、作業メモのファイルに記録し、以降の質問ではそれを参照します。文脈の境目をまたいで、発見が残り、劣化を和らげます。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
The role of scratchpad files for persisting key findings across context boundarieshttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Having agents maintain scratchpad files recording key findings, referencing them for subsequent questions to counteract context degradationhttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:Effective context engineering for AI agents
Structured note-taking, or agentic memory, is a technique where the agent regularly writes notes persisted to memory outside of the context window.https://www.anthropic.com/research/effective-context-engineering-for-a…(取得 2026-11-20)
段階の要約を、次の段階に渡す 読了

ひとつの探索の段階が終わったら、重要な発見を要約し、次の段階のサブエージェントの最初の文脈に入れます。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Summarizing key findings from one exploration phase before spawning sub-agents for the next phase, injecting summaries into initial contexthttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
途中で止まっても、再開できるように 読了

各担当が、状態を決まった場所に書き出し、調整役が、再開のときに目録を読み込んで、各担当のプロンプトに入れます。新しい文脈の担当が、作業の状態を素早く把握できます。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Structured state persistence for crash recovery: each agent exports state to a known location, and the coordinator loads a manifest on resumehttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Designing crash recovery using structured agent state exports (manifests) that the coordinator loads on resume and injects into agent promptshttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:Effective harnesses for long-running agents
The key insight here was finding a way for agents to quickly understand the state of work when starting with a fresh context window, which is accomplished with the claude-progress.txt file alongside the git history.https://www.anthropic.com/research/effective-harnesses-for-long-runnin…(取得 2026-11-20)
文脈が埋まってきたら、圧縮する 読了

探索の出力で文脈がふくらんだら、/compact で会話を構造化した要約に置き換えます。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Using /compact to reduce context usage during extended exploration sessions when context fills with verbose discovery outputhttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
出典:Explore the context window
you run /compact, which replaces the conversation with a structured summary.https://code.claude.com/docs/en/context-window.md(取得 2026-11-20)
試験のポイント
- 探索の調査は、サブエージェントに任せ、要約だけを受け取る。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Subagent delegation for isolating verbose exploration output while the main agent coordinates
https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20) - 発見は、作業メモのファイルに書き、あとの質問で参照する。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Having agents maintain scratchpad files recording key findings, referencing them for subsequent questions to counteract context degradation
https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20) - 状態の目録で再開できる設計にし、膨らんだら /compact。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Structured state persistence for crash recovery: each agent exports state to a known location, and the coordinator loads a manifest on resume
https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Using /compact to reduce context usage during extended exploration sessions when context fills with verbose discovery output
https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)