/session-memory
Maintain context and learnings across Claude Code sessions for continuous improvement.
> /plugin marketplace add ruvnet/claude-flowHow it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/session-memory
Context preview
What this command does when you run it.
Maintain context and learnings across Claude Code sessions for continuous improvement.
Command definition
session-memory.mdCross-Session Memory
Purpose
Maintain context and learnings across Claude Code sessions for continuous improvement.
Memory Features
1. Automatic State Persistence
At session end, automatically saves:
- Active agents and specializations
- Task history and patterns
- Performance metrics
- Neural network weights
- Knowledge base updates
2. Session Restoration
// Using MCP tools for memory operations
mcp__claude-flow__memory_usage({
"action": "retrieve",
"key": "session-state",
"namespace": "sessions"
})
// Restore swarm state
mcp__claude-flow__context_restore({
"snapshotId": "sess-123"
})**Fallback with npx:**
npx claude-flow hook session-restore --session-id "sess-123"
3. Memory Types
**Project Memory:**
- File relationships
- Common edit patterns
- Testing approaches
- Build configurations
**Agent Memory:**
- Specialization levels
- Task success rates
- Optimization strategies
- Error patterns
**Performance Memory:**
- Bottleneck history
- Optimization results
- Token usage patterns
- Efficiency trends
4. Privacy & Control
// List memory contents
mcp__claude-flow__memory_usage({
"action": "list",
"namespace": "sessions"
})
// Delete specific memory
mcp__claude-flow__memory_usage({
"action": "delete",
"key": "session-123",
"namespace": "sessions"
})
// Backup memory
mcp__claude-flow__memory_backup({
"path": "./backups/memory-backup.json"
})**Manual control:**
# View stored memory
ls .claude-flow/memory/
# Disable memory
export CLAUDE_FLOW_MEMORY_PERSIST=false
Benefits
- ๐ง Contextual awareness
- ๐ Cumulative learning
- โก Faster task completion
- ๐ฏ Personalized optimization
Read more
Cross-Session Memory
Purpose
Maintain context and learnings across Claude Code sessions for continuous improvement.
Memory Features
1. Automatic State Persistence
At session end, automatically saves:
- Active agents and specializations
- Task history and patterns
- Performance metrics
- Neural network weights
- Knowledge base updates
2. Session Restoration
// Using MCP tools for memory operations
mcp__claude-flow__memory_usage({
"action": "retrieve",
"key": "session-state",
"namespace": "sessions"
})
// Restore swarm state
mcp__claude-flow__context_restore({
"snapshotId": "sess-123"
})**Fallback with npx:**
npx claude-flow hook session-restore --session-id "sess-123"
3. Memory Types
**Project Memory:**
- File relationships
- Common edit patterns
- Testing approaches
- Build configurations
**Agent Memory:**
- Specialization levels
- Task success rates
- Optimization strategies
- Error patterns
**Performance Memory:**
- Bottleneck history
- Optimization results
- Token usage patterns
- Efficiency trends
4. Privacy & Control
// List memory contents
mcp__claude-flow__memory_usage({
"action": "list",
"namespace": "sessions"
})
// Delete specific memory
mcp__claude-flow__memory_usage({
"action": "delete",
"key": "session-123",
"namespace": "sessions"
})
// Backup memory
mcp__claude-flow__memory_backup({
"path": "./backups/memory-backup.json"
})**Manual control:**
# View stored memory ls .claude-flow/memory/ # Disable memory export CLAUDE_FLOW_MEMORY_PERSIST=false
Benefits
- ๐ง Contextual awareness
- ๐ Cumulative learning
- โก Faster task completion
- ๐ฏ Personalized optimization
An agent meta-harness for Claude Code and Codex. Agent = Model + Harness. The model writes; the harness gives it tools, memory, loops, sandboxes, and controls so it can actually work.
Repo: ruvnet/claude-flow
Other commands on claude-flow.
- /agent-capabilities
Matrix of agent capabilities and their specializations.
Open command - /agent-coordination
Coordination patterns for multi-agent collaboration.
Open command - /agent-spawning
Guide to spawning agents with Claude Code's Task tool.
Open command - /agent-types
Complete guide to all 54 available agent types in Claude Flow.
Open command - /COMMAND_COMPLIANCE_REPORT
Reviewed all command files in `.claude/commands/analysis/` directory to ensure proper usage of: - `mcp__claude-flow__*` tools (preferred) - `npx claude-flow` commands (as fallback) - No direct implementation calls
Open command - /bottleneck-detect
Analyze performance bottlenecks in swarm operations and suggest optimizations.
Open command

