session-recap

io.github.BruceXcluding由 GitHub 帳號 BruceXcluding 發布v0.6.1更新於 Nov 6, 2026

Recap AI coding sessions (Claude Code, Codex, dsh, OpenCode): intent, decisions, open threads.

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

把本機的 AI 程式開發工作階段(Claude Code、Codex、dsh、OpenCode)整理成意圖、決策、變更、未完成事項與續接點的摘要。

可以做什麼
  • 列出本機 Claude Code、Codex、dsh 與 OpenCode 的已儲存工作階段,依最新排序,可依標題詞、專案資料夾或代理篩選
  • 產生工作階段摘要:意圖、關鍵決策、變更內容、未完成事項與續接點,未指定時預設取目前資料夾中呼叫端代理的最新工作階段
  • 工作階段未變更時重用已存摘要,否則回傳精簡後的逐字稿與指示,由助理自行撰寫摘要
  • 儲存助理寫好的摘要,供下次重用並依新增內容更新
  • 可要求 standup、handoff、PR 等替代格式
適用情境
適合在人員詢問某個或先前的開發工作階段在做什麼、上次做到哪裡,或需要摘要與交接說明時使用。對累積大量長逐字稿、跨多個代理工作的開發者特別有用。
執行需求
以 stdio 在本機執行,可透過 npx 或全域 npm 安裝;需要 Node.js 20+ 與 python3,讀取 dsh 工作階段還需 zstd 指令或 Python 3.14+。透過 MCP 使用時不需 API 金鑰,由呼叫的助理自行撰寫摘要;CLI 與檢視器的模型為選用。
安裝前請注意
它會讀取各代理儲存目錄中的本機工作階段逐字稿,並把精簡後的逐字稿(提示詞、每輪最終回覆、提交、PR、編輯過的檔案)送往模型。機密在送出前以樣式比對替換,但無法涵蓋所有格式。摘要會寫入本機快取;選用的 CLI/檢視器模型需要 SESSION_RECAP_API_KEY 等供應商憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 session-recap,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

session-recap

English | 中文

[session-recap icon]

Remember what every AI coding session was for.

intent · key decisions · what changed · open threads · where to resume, for sessions of any length, from any agent, through MCP, a local viewer or a plugin

[tests] [release] [npm] [license]

[Claude Code]  [Codex]  [dsh]  [OpenCode]


Projects grow, and so does the number of sessions in each one, often across several agents. After a few weeks a session is a 100 MB transcript you no longer remember: why you started it, what you decided, what was left half done.

session-recap reads a session's whole transcript and writes a short, structured recap. Use it from any MCP client (Codex, Cursor, Zed, Cline, Gemini CLI, OpenCode, Claude Code…), in a local viewer for every agent's sessions, from the command line, or through native plugins for Claude Code, dsh and Codex.

[A recap: an Intent card, a Where to resume card, and tabs for decisions, changes and open threads]

SectionWhat it answers
IntentWhat was I ultimately trying to achieve?
Key ideas and decisionsWhat did we choose, and why? Which alternatives were rejected?
What changedFiles, features, documents, commits, PRs
Open threadsWhat is unfinished, unverified or still a question
Where to resumeThe most sensible next step today

Every recap also has a Map: the phases the work went through (pivots marked) down to "you are here", the key decisions with what was turned down, and lists of what shipped, what is open and what was dropped. Recaps are written in the language you mostly write in.

Quick start

bash
npm install -g session-recapsession-recap mcp-config            # prints the MCP entry for your clientsession-recap serve                 # opens the local viewer

Then, in your agent: "Recap this session", "What was my last session in this project about?", "总结一下这个会话".

No API key needed. Through MCP, the agent you are talking to writes the recap with its own model; session-recap only reads and condenses the transcript. A model of session-recap's own is optional (for the CLI and the viewer's Write recap button).

Or run it without installing: npx session-recap …. session-recap has no dependencies and runs no install scripts. The development version: npm install -g github:BruceXcluding/session-recap --allow-git=all (npm 12 blocks installs from GitHub without the flag).

Requirements: Node.js 20+, python3 (macOS ships one), and for dsh sessions the zstd command or Python 3.14+.

Ways to use it

Best forHow
MCP serverany MCP clientsession-recap mcp-config <client>, see below
Local viewerbrowsing every agent's sessions, Recap and Mapsession-recap serve
Claude Code plugina Recap / Map pane beside the chat/plugin install session-recap --marketplace BruceXcluding/session-recap
dsh plugin/recap and the session_recap tool in dshpackages/dsh
Codex pluginthe MCP server, packaged for Codexplugins/codex
Command linescripts, quick looks, other formatssession-recap, session-recap list

MCP server

session-recap mcp-config <client> prints the entry for claude, codex, cursor, gemini (and Qwen Code), opencode, zed, vscode or cline, with absolute paths so an IDE started from the dock finds it. For example:

bash
session-recap mcp-config codex >> ~/.codex/config.tomlclaude mcp add --scope user session-recap -- session-recap mcp

Tools:

ToolWhat it does
list_sessionsSessions of every agent, filtered by title words, project folder or agent
recap_sessionThe recap of the current session (or one named): a stored one if the session has not changed; else written by session-recap's model if one is configured; else the condensed, secret-free transcript and instructions for the calling agent to write it
save_recapStores the recap the agent wrote, so it is reused, and updated from the new part next time

recap_session also takes format: standup, handoff or pr instead of the recap.

Local viewer

session-recap serve opens http://127.0.0.1:4711 with every agent's sessions by project folder, grouped by time, filtered by agent; each session's Recap and Map; and, with a model configured, Write recap and Update recap. It reads the recaps written by the Claude Code plugin, the CLI and MCP clients alike. It answers only on loopback, to the browser tab it opened.

Claude Code plugin

/session-recap recaps the session you are in; /session-recap browse lists projects and sessions; /session-recap <name> opens a project or a session by name. The pane shows Recap and Map, uses the session's own model (or one picked under Model), and shows your Claude Code sessions first, with All agents one tap away.

Command line

CommandWhat it does
session-recap [words]Recaps the session whose title holds the words; with none, the newest one in this folder
session-recap list [words]Lists sessions (the calling agent's; --all for every agent)
session-recap --format standupA standup note instead (handoff, pr)
session-recap --dry-runShows the size that would be sent, and how many secrets were removed, without calling a model
session-recap modelsLists your provider's models
session-recap config set model <id>Saves settings (partModel, api, baseUrl; the key with config set apiKey - from stdin)

The CLI's own model: SESSION_RECAP_API (anthropic or openai), SESSION_RECAP_BASE_URL, SESSION_RECAP_API_KEY, SESSION_RECAP_MODEL, or ANTHROPIC_*, DEEPSEEK_API_KEY, OPENAI_API_KEY.

Supported agents

AgentSessions read from
Claude Code~/.claude/projects/
Codex~/.codex/sessions/, archived_sessions/ (review threads left out)
dsh (deepseek-harness)~/.dsh/sessions/ (zstd; subagent sessions left out)
OpenCode~/.local/share/opencode/opencode.db

Want another? Adding an agent is one reader and one test, or ask for it.

Privacy

  • Local. Sessions are read on your machine. Text leaves it only in the model call a recap needs: your agent's (MCP, plugins) or the one you configured (CLI, viewer). No telemetry.
  • Secrets removed first. Keys, tokens, private keys, credentials in URLs and PASSWORD=…-style assignments are replaced with [REDACTED:<kind>] before any text reaches a model. --dry-run shows how many. It is pattern matching, so it cannot know every format: see SECURITY.md.
  • What is sent is a condensed transcript: your prompts, each turn's final reply, commits and PRs, the files edited. Tool output and intermediate replies are left out.

Token use

Listing never calls a model. On a real 179 MB Claude Code session (220 prompts), a first recap sends about 195k characters (~96k tokens); when the session continues, an update reads only the new prompts. Long sessions are condensed in parts of ≤75k characters, each part's notes cached, and a cheaper model can condense the parts (partModel).

How it works

saved sessions (Claude Code · Codex · dsh · OpenCode)        │hooks/digest.py      one reader per agent → turns (prompt, actions, final reply, edits) → secrets removed        │core/recap.mjs       parts → notes (parallel, cached) → one call writes the recap and its map, or updates it        │MCP server · viewer · CLI · Claude Code pane · dsh tool and /recap      (one cache: ~/.cache/session-recap)

Output is versioned: see docs/data-format.md and schema/recap-v1.schema.json to build your own viewer or exporter.

Contributing

Agents, recap formats, translations and viewers are all welcome. Start with CONTRIBUTING.md; adding an agent and adding a format (one entry in core/formats.mjs) are the easiest first contributions.

License

MIT

來源:README.md,提交 0fd412d

工具

3

list_sessions

List AI coding sessions

Lists saved sessions of Claude Code, Codex, dsh and OpenCode on this machine, newest first: agent, id, title, project folder, last activity. Filter by words in the title, by project folder, or by agent.

輸入參數cwdagentlimitquery

recap_session

Recap a session

Recaps a coding session: intent, key decisions, what changed, open threads, where to resume. With no session given, the newest session of the calling agent in `cwd`. Returns a stored recap when the session has not changed since. Otherwise, if session-recap has a model configured it writes the recap; if not, it returns the condensed transcript and instructions, and you write the recap yourself and store it with save_recap.

輸入參數cwdmodeagentformatrefreshsession

save_recap

Store a recap you wrote

Stores the recap you wrote for a session after recap_session returned its transcript, so the next recap of that session is reused or updated from it. Pass the agent, id and prompts recap_session gave you.

輸入參數id必填agent必填prompts必填markdown必填

版本歷史

2
  1. v0.6.1最新Nov 6, 2026
  2. v0.6.0Nov 5, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分