session-persist

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Session Persistence

会话持久化

Save and restore complete agent sessions across conversations.
在对话之间保存和恢复完整的Agent会话。

When to use

使用场景

When you need to pause work and resume later with full context, or when you want to checkpoint progress during long-running tasks.
当你需要暂停工作并在之后恢复完整上下文,或者在长时间运行的任务中想要记录进度检查点时。

Steps

操作步骤

  1. Save session — call
    mcp__claude-flow__session_save
    to snapshot current state
  2. List sessions — call
    mcp__claude-flow__session_list
    to see all saved sessions
  3. Restore — call
    mcp__claude-flow__session_restore
    to resume a previous session
  4. Info — call
    mcp__claude-flow__session_info
    for session details and metadata
  5. Clean up — call
    mcp__claude-flow__session_delete
    to remove old sessions
  1. 保存会话 — 调用
    mcp__claude-flow__session_save
    来快照当前状态
  2. 列出会话 — 调用
    mcp__claude-flow__session_list
    查看所有已保存的会话
  3. 恢复会话 — 调用
    mcp__claude-flow__session_restore
    恢复之前的会话
  4. 查看信息 — 调用
    mcp__claude-flow__session_info
    获取会话详情和元数据
  5. 清理会话 — 调用
    mcp__claude-flow__session_delete
    移除旧会话

Session hooks

会话钩子

  • hooks_session-start
    — automatically restore context at conversation start
  • hooks_session-end
    — automatically save state with metrics export
  • hooks_session-restore
    — restore a specific session by ID
  • hooks_session-start
    — 在对话开始时自动恢复上下文
  • hooks_session-end
    — 自动保存状态并导出指标
  • hooks_session-restore
    — 通过ID恢复特定会话

What's persisted

持久化内容

  • Agent state and configuration
  • Memory entries and patterns
  • Learning trajectories and metrics
  • Task progress and todos
  • Agent状态和配置
  • 内存条目和模式
  • 学习轨迹和指标
  • 任务进度和待办事项