Conversation Summary for New Chat Context - Claude Code Method

Condenses long chat conversations into comprehensive summaries for transferring context to new sessions. Rationale: Model performance degrades as chats get longer. This is a convenient way to condense your current chat so you can transfer context to a fresh chat. How it works: - Creates 9-section summaries capturing all user requests, key topics, corrections, and current work status. Origin: Adapted from Claude Code's technical documentation prompt, maintaining the same thoroughness for any conversation type.

Prompt Text:

USER: Create a detailed summary of our conversation so far, paying close attention to the my explicit requests and your previous responses. This summary should be thorough in capturing important details, discussion patterns, and key decisions that would be essential for continuing the conversation without losing context.

Before providing your final summary, create an "Analysis" section using markdown formatting to organize your thoughts and ensure you've covered all necessary points. In your analysis process:

1. Chronologically analyze each message and section of the conversation. For each section thoroughly identify:
   - The user's explicit requests and intents
   - Your approach to addressing the user's requests
   - Key decisions, concepts, and discussion patterns
   - Specific details like:
     - Topics and subtopics discussed
     - Specific examples provided
     - Content created or analyzed
     - Resources mentioned or referenced
     - Recommendations made
   - Misunderstandings that arose and how you clarified them
   - Pay special attention to specific user feedback that you received, especially if the user told you to approach something differently.

2. Double-check for accuracy and completeness, addressing each required element thoroughly.

Your summary should include the following sections:

1. **Primary Request and Intent**: Capture all of the user's explicit requests and intents in detail

2. **Key Topics and Concepts**: List all important topics, concepts, and subject areas discussed.

3. **Content and Artifacts**: Enumerate specific content examined, created, or discussed. Pay special attention to the most recent messages and include full examples where applicable and include a summary of why each piece of content or discussion point is important.

4. **Corrections and Clarifications**: List all misunderstandings, incorrect assumptions, or information that needed correction, and how you addressed them. Pay special attention to specific user feedback that you received, especially if the user told you to approach something differently.

5. **Problem Solving**: Document problems addressed and any ongoing efforts to help the user.

6. **All User Messages**: List ALL user messages that are not tool results. These are critical for understanding the users' feedback and changing intent.

7. **Pending Tasks**: Outline any pending tasks that you have explicitly been asked to work on.

8. **Current Discussion/Activity**: Describe in detail precisely what was being discussed or worked on immediately before this summary request, paying special attention to the most recent messages from both user and assistant. Include specific examples and content where applicable.

9. **Optional Next Step**: List the next step that you will take that is related to the most recent discussion or activity. IMPORTANT: ensure that this step is DIRECTLY in line with the user's explicit requests, and the topic you were discussing immediately before this summary request. If your last task was concluded, then only list next steps if they are explicitly in line with the users request. Do not start on tangential topics without confirming with the user first.
   If there is a next step, include direct quotes from the most recent conversation showing exactly what you were discussing and where you left off. This should be verbatim to ensure there's no drift in topic interpretation.

## Required Output Format

Always begin your response with: "This session is being continued from a previous conversation that ran out of context. The conversation is summarized below:"

Then structure your response using markdown as follows:

```
This session is being continued from a previous conversation that ran out of context. The conversation is summarized below:

## Analysis
[Your thought process, ensuring all points are covered thoroughly and accurately]

## Summary

### 1. Primary Request and Intent
[Detailed description]

### 2. Key Topics and Concepts
- [Topic/Concept 1]
- [Topic/Concept 2]
- [...]

### 3. Content and Artifacts
- **[Content/Topic 1]**
  - [Summary of why this content/discussion is important]
  - [Summary of what was created or discussed]
  - [Important example or excerpt]
- **[Content/Topic 2]**
  - [Important example or excerpt]
- [...]

### 4. Corrections and Clarifications
- **[Detailed description of misunderstanding/correction 1]:**
  - [How you clarified or corrected it]
  - [User feedback on the correction if any]
- [...]

### 5. Problem Solving
[Description of problems addressed and ongoing efforts]

### 6. All User Messages
- [Detailed non-tool-use user message]
- [...]

### 7. Pending Tasks
- [Task 1]
- [Task 2]
- [...]

### 8. Current Discussion/Activity
[Precise description of current discussion/activity]

### 9. Optional Next Step
[Optional next step to take]
```

Please provide your summary based on the conversation so far, following this structure and ensuring precision and thoroughness in your response.