Help us improve
Share bugs, ideas, or general feedback.
From claudecode-research-harness-workflow
Manages cross-session memory persistence by saving work history, decisions, and learned patterns to `.claude/memory/`. Useful for continuing work across sessions.
npx claudepluginhub maxwell2732/claudecode-research-harness-workflow --plugin claudecode-research-harness-workflowHow this skill is triggered — by the user, by Claude, or both
Slash command
/claudecode-research-harness-workflow:session-memoryThis skill is limited to the following tools:
The summary Claude sees in its skill listing — used to decide when to auto-load this skill
A skill for managing learnings and memory across sessions.
Manages cross-session learning and memory persistence by recording session logs, decisions, patterns, and project context in .claude/memory/. Invoked automatically for session handoff and history queries.
Manages persistent memory across sessions with .claude/memory/ for state and .ai/ for architecture/patterns. Guides scratchpad updates, session workflows, and live docs.
Saves session summaries, decisions, pending tasks, and auto-loads a briefing on the next Claude Code session for continuity across sessions.
Share bugs, ideas, or general feedback.
A skill for managing learnings and memory across sessions. Records and references past work, decisions, and learned patterns.
This skill is automatically invoked by the following phrases:
This skill saves work history to .claude/memory/ and
enables knowledge continuity across sessions.
It also clarifies "where important information should be stored" (details: docs/MEMORY_POLICY.md).
.claude/
├── memory/
│ ├── session-log.md # Per-session log
│ ├── decisions.md # Important decisions
│ ├── patterns.md # Learned patterns
│ └── context.json # Project context
└── state/
└── agent-trace.jsonl # Agent Trace (tool execution history)
decisions.md / patterns.md
#decision #db) with an Index at the topsession-log.md / context.json / .claude/state/
Each session record is assigned a session ID obtained from the runtime environment.
In Claude Code, ${CLAUDE_SESSION_ID} is preferred; in Codex, the Codex runtime session / thread ID is preferred.
If neither is available, read .session_id from .claude/state/session.json, with datetime-based ID as final fallback.
This improves cross-session traceability.
## Session: 2024-01-15 14:30 (session: abc123def)
### Tasks Completed
- [x] User authentication implementation
- [x] Login page creation
### Files Generated
- src/lib/auth.ts
- src/app/login/page.tsx
### Important Decisions
- Authentication method: Adopted Supabase Auth
### Handoff to Next Session
- Logout feature not yet implemented
- Password reset also needed
Note:
${CLAUDE_SESSION_ID}is an environment variable automatically set by Claude Code. This variable may not exist on the Codex side, so do not assume it is fixed; use the Codex runtime session / thread ID or.claude/state/session.jsoninstead.
## Technology Selections
| Date | Decision | Reason |
|------|---------|--------|
| 2024-01-15 | Supabase Auth | Free tier available, easy setup |
| 2024-01-14 | Next.js App Router | Latest best practices |
## Architecture
- Components: `src/components/`
- Utilities: `src/lib/`
- Type definitions: `src/types/`
## Patterns in This Project
### Component Naming
- PascalCase
- Examples: `UserProfile.tsx`, `LoginForm.tsx`
### API Endpoints
- `/api/v1/` prefix
- RESTful design
### Error Handling
- Wrap in try-catch
- Error messages in English
{
"project_name": "my-blog",
"created_at": "2024-01-14",
"stack": {
"frontend": "next.js",
"backend": "next-api",
"database": "supabase",
"styling": "tailwind"
},
"current_phase": "Phase 2: Core Features",
"last_session": "2024-01-15T14:30:00Z"
}
.claude/memory/context.jsonAgent Trace Usage:
# Get list of edited files from last session
tail -50 .claude/state/agent-trace.jsonl | jq -r '.files[].path' | sort -u
# Get project information
tail -1 .claude/state/agent-trace.jsonl | jq '.metadata'
decisions.mdpatterns.mdsession-log.mdcontext.jsonFrom Claude Code 2.1.49 onward, memory usage when resuming sessions has been reduced by 68%.
# Use --resume for long work sessions
claude --resume
# Split large tasks and resume sessions
claude --resume "Continue from where we left off"
| Scenario | Recommendation |
|---|---|
| Long implementation | Resume session every 1–2 hours |
| Large-scale refactoring | Split by feature unit |
| Memory shortage warning | Immediately resume with --resume |
Memory efficiency has greatly improved — actively leverage session resumption.
The /recap command added in CC 2.1.108 (alias for /rewind) is used to quickly review
what has been done so far in the current session.
Most effective when combined with checking before returning to another session with --resume, or for mid-session checks during long work.
Recommended Timing:
| Timing | Usage |
|---|---|
Just before resuming with --resume | Use /recap to organize context before claude --resume |
| Before resuming a Breezing Worker | Check in-session progress with /recap before moving to next task |
| Midpoint of long implementation (over 1 hour) | Check status with /recap → manually append to session-log.md if needed |
# Typical usage flow
# 1. Check current work status
/recap
# 2. After manually appending to session-log.md if needed, resume session
claude --resume
/recaponly reviews within the current session. Previous session content is checked viasession-log.mdor context inheritance withclaude --resume.
User: "Continue from last time"
Claude Code:
📋 Previous Session (2024-01-15)
Completed tasks:
- User authentication
- Login page
Incomplete:
- Logout feature
- Password reset
Say "Create the logout feature" to continue implementation.
User: "Tell me about this project"
Claude Code:
📁 Project: my-blog
Technology stack:
- Next.js + Tailwind CSS + Supabase
Current phase: Core feature development
Progress: 40% complete
Recent decisions:
- Adopted Supabase Auth
- Using App Router
Claude Code 2.1.32+ has an "auto-memory" feature that automatically saves cross-session learnings to ~/.claude/projects/<project>/memory/MEMORY.md.
It coexists with the Harness memory system as a 3-layer architecture:
| Layer | System | Content | Management |
|---|---|---|---|
| Layer 1 | Claude Code auto-memory | General learnings (avoiding mistakes, tool usage) | Implicit/automatic |
| Layer 2 | Harness SSOT | Project-specific decisions and patterns | Explicit/manual |
| Layer 3 | Agent Memory | Per-agent task learnings | Agent-defined |
Usage guidelines:
/memory ssotDetails: D22: 3-Layer Memory Architecture
session-log.md automatically via hooks/Stop at session end (manual operation is fine if not set up)decisions.md/patterns.md recommended for sharing; session-log.md/context.json/.claude/state/ recommended as local-only (details: docs/MEMORY_POLICY.md)