SuperAPI AI 工具集

resume-session

智能体与模型

查看项目

更新于 10-16 04:54

技能介绍

用途:在 MCP 服务器意外断开后,恢复仍在进行中的 Ouroboros 会话。Claude Code 已占用 /resume 作为内置会话选择器,因此该技能刻意命名为 resume-session,避免遮蔽原生命令。

主要能力:直接读取 EventStore(无需 MCP 服务器),列出所有处于 running 或 paused 状态的会话。命令严格只读,不会创建数据目录、不会写入 schema、不会追加事件,只负责给出重新接续所需的标识符。默认显示最近 20 个活跃会话,加 --all 显示全部。

使用方式:

  • ooo resume-session
  • ooo resume-session --all
  • /ouroboros:resume-session

触发关键词:in-flight Ouroboros sessions、re-attach、mcp disconnected、lost Ouroboros execution。

调用后运行 ouroboros resume,读取已配置的运行时 EventStore。若列出会话,输入编号,命令会打印 session_id 与 exec_id 及可用的重新接续路径。接续路径包括:只读查看持久化事件 ouroboros status execution <exec_id> --events;只读交互式监控 ouroboros tui monitor;恢复执行(需原始 seed 文件)ouroboros run workflow --orchestrator --resume <session_id> <seed.yaml>。

退出码:0 成功列出或无会话;1 用户选择无效(非数字或越界);2 EventStore 存在但无法打开或读取。

限制与回退:若提示 No in-flight sessions found,说明执行已完成、失败、被取消,或 EventStore 从未创建。此时可用 ouroboros tui monitor 交互浏览历史会话。恢复执行必须提供原始 seed 文件。后续可用 ooo evaluate 评估结果,或用 ooo cancel execution <exec_id> 取消卡住的会话。

RFC #1392 要求最终回复以一行状态面包屑结尾:◆ <current state> → next: <recommended action>,状态优先取自 ouroboros_session_status,否则依据本技能实际结果;不要使用线性的 Step N of M 形式。