講座 › 分野1 エージェントアーキテクチャとオーケストレーション
1.7 セッションの再開とフォーク
配点 3.9%Session state, resumption and forking
続きから再開するか、分岐させるか、まっさらに始めるか。前の結果がまだ有効かどうかで決める。
未読
継続・再開・フォーク 読了

継続は、そのフォルダーで最新のセッションを続けます。再開は、セッションIDを指定して特定の会話に戻ります。フォークは、元の履歴をコピーした新しいセッションを作り、元はそのまま残ります。
出典:Work with sessions
Continue finds the most recent session in the current directory.https://code.claude.com/docs/en/agent-sdk/sessions.md(取得 2026-11-20)
出典:Work with sessions
Resume takes a specific session ID. You track the ID.https://code.claude.com/docs/en/agent-sdk/sessions.md(取得 2026-11-20)
出典:Work with sessions
Fork is different: it creates a new session that starts with a copy of the original's history. The original stays unchanged.https://code.claude.com/docs/en/agent-sdk/sessions.md(取得 2026-11-20)
名前をつけて、あとから戻る 読了

コマンドラインでは、セッションに名前をつけておけば、その名前を指定して直接再開できます。複数日にまたがる調査を、名前で呼び戻せます。
出典:Sessions
claude --resume <name> Resumes the named session directlyhttps://code.claude.com/docs/en/sessions.md(取得 2026-11-20)
フォーク:同じ土台から別々の案を試す 読了

コードベースの分析を済ませたところで分岐させれば、2つのテスト戦略や、2つのリファクタリング案を並行して比べられます。元のセッションは変わらないので、いつでも戻れます。
出典:Work with sessions
Try an alternative approach without losing the originalhttps://code.claude.com/docs/en/agent-sdk/sessions.md(取得 2026-11-20)
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Using fork_session to create parallel exploration branches (e.g., comparing two testing strategies or refactoring approaches from a shared codebase analysis)https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
再開するか、要約を持って新規に始めるか 読了

前に読んだファイルが書き換わっていると、再開した会話の中のツール結果は古くなっています。多くが古いなら、構造化した要約を持って新しく始めるほうが確実です。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Why starting a new session with a structured summary is more reliable than resuming with stale tool resultshttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
再開するなら、変更点を伝える 読了

前の分析がおおむね有効で再開するときは、変わったファイルを具体的に伝えます。そうすれば、全部を調べ直させず、変わった箇所だけを再分析させられます。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
The importance of informing the agent about changes to previously analyzed files when resuming sessions after code modificationshttps://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)
試験のポイント
- 再開は特定の会話に戻る。フォークは同じ土台から別の案を試す。
出典:Work with sessions
Fork is different: it creates a new session that starts with a copy of the original's history. The original stays unchanged.
https://code.claude.com/docs/en/agent-sdk/sessions.md(取得 2026-11-20) - 結果が古い疑いが強いなら、要約を持って新規に始める。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
Why starting a new session with a structured summary is more reliable than resuming with stale tool results
https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20) - 再開するときは、変わったファイルをエージェントに伝える。
出典:Claude Certified Architect – Foundations Exam Guide v1.0(英語)
The importance of informing the agent about changes to previously analyzed files when resuming sessions after code modifications
https://everpath-course-content.s3-accelerate.amazonaws.com/instructor…(取得 2026-11-20)