Overview
Save a structured summary when a coding session ends or when significant work is complete. This creates a high-level overview that future sessions use to understand what happened, what was learned, and what’s left to do.This is a core tool in the agent profile, always loaded in the MCP context.
When to Use
- Session ending — when the user is done for the day
- Major milestone — when significant work is complete
- Context checkpoint — before a long break or context compaction
- Handoff — when switching agents or team members
Parameters
Full session summary using the structured formatUse this exact structure:
Project nameAssociates the session summary with a specific project.Example:
my-api, engram, frontendSession identifierDefault:
manual-save-{project}Links the summary to a specific coding session.Response
Confirmation message
Structured Format
Goal
One sentence describing what this session aimed to accomplish.Examples
Examples
- “Build JWT authentication system for the API”
- “Fix N+1 query performance issues in user list”
- “Add CSV export feature to admin dashboard”
- “Investigate and resolve FTS5 search crashes”
Instructions (Optional)
User preferences, constraints, or discovered context about how the user wants things done.Examples
Examples
- “User prefers TypeScript strict mode — all new files must have explicit types”
- “Use Zod for validation — no manual type guards”
- “Follow existing pattern: one service per domain entity”
- “No external dependencies without approval — prefer stdlib”
Discoveries
Technical findings, gotchas, and non-obvious learnings. This is the most valuable section.Examples
Examples
- “FTS5 MATCH syntax requires quotes around terms with special chars — raw user input crashes”
- “SQLite WAL mode creates -wal and -shm files — safe to delete only when DB is closed”
- “Next.js data fetching doesn’t auto-optimize joins — always check Network tab for N+1 patterns”
- “JWT refresh tokens need separate rotation logic — access token expiry alone is insufficient”
- “Go’s fmt.Errorf with %w preserves error chains for errors.Is() — %v does not”
Accomplished
Completed tasks with key implementation details and identified next steps.Format
Format
Use checkmarks:
- ✅ Completed — tasks that are done
- 🔲 Identified but not done — for next session
- What was done (high-level)
- Files changed (if relevant)
- Any important decisions made
Examples
Examples
- ✅ Added JWT authentication middleware — validates tokens on protected routes (src/middleware/auth.ts)
- ✅ Refactored UserService to repository pattern — separates DB logic from business logic (src/services/UserService.ts, src/repositories/UserRepository.ts)
- ✅ Fixed N+1 query in user list — added eager loading for relationships (src/api/users.ts line 45)
- 🔲 Add refresh token rotation — identified security requirement, not yet implemented
- 🔲 Write tests for auth middleware — covered in next session
Relevant Files
Files that were significantly changed or are important for context.Format
Format
- ✅
src/middleware/auth.ts— JWT validation logic - ✅
internal/store/store.go— FTS5 query sanitization added - ❌
src/— too vague - ❌ Full absolute paths like
/Users/me/projects/app/src/...— use relative paths
Usage Example
Guidelines
Be Concise
Be Concise
Don’t lose important details, but avoid verbosity:
- ✅ “Added eager loading for user relationships to fix N+1 query”
- ❌ “First I identified the N+1 query by opening the Network tab and seeing 50+ requests, then I researched how to fix it, then I added include: [‘profile’, ‘settings’] to the query…”
Focus on What and Why, Not How
Focus on What and Why, Not How
The code is in the repo — focus on context:
- ✅ “Switched to JWT because session storage doesn’t scale across instances”
- ❌ “I imported jsonwebtoken, then created a secret in .env, then wrote a function to sign tokens with HS256…”
Capture Non-Obvious Learnings
Capture Non-Obvious Learnings
Discoveries are the most valuable section. Focus on surprises:
- ✅ “FTS5 requires quotes around search terms — special chars are operators”
- ✅ “WAL files are safe to delete only when DB is closed”
- ❌ “I learned that TypeScript has types” (obvious)
Relevant Files Should Be Selective
Relevant Files Should Be Selective
Only include files that provide context:
- ✅ Core files that changed
- ✅ New architectural pieces
- ❌ Every file touched (config tweaks, imports, etc.)
What Gets Stored
The session summary is saved as an observation with:- Type:
session_summary - Title:
Session summary: {project} - Content: The structured markdown you provide
- Project: The specified project
- Session ID: Links to the session
When Future Sessions See This
Session summaries appear in:mem_context— shows recent session summaries firstmem_search— can search summary content by keywords- TUI session view — displays session summaries
- HTTP API —
/api/sessions/{id}includes the summary
Related Tools
mem_save- Save individual observations during the sessionmem_session_start- Register session startmem_session_end- Mark session as completedmem_context- Retrieve recent session context