用 git notes 做多 Claude Code 会话共享时间线,省掉互发消息

Commercial_Base488 · reddit · 2026-10-16

作者并行运行多个 Claude Code 会话(每项目一个外加 reviewer 会话),会话间互发状态消息浪费 token 且常有延迟重复。他的解法:每个会话把完成的事写成 git note(git notes --ref=timeline append),新会话启动时通过 SessionStart hook 运行约 40 行的 Python 脚本,汇总各仓库最近一天的 commits 和 notes 按时间排序,注入前 20 行到上下文。

关键细节:

所属事件:开发者用 git notes 协调多个 Claude Code 并行会话(2 条相关)→

原文链接 →

「编程与Agent」频道最新

更多「编程与Agent」频道 AI 资讯 →