Skip to content

BB20260410/continuum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔁 Continuum — Claude Code 会话永不死

ctx 涨到 97% 自动开新窗口接力。每个 turn 静默累积事实快照,新会话开箱即接。

Claude Code never dies. Auto-spawn a new session when context fills, with turn-by-turn fact snapshots that survive the handoff.

v3.9.0 tests license


问题

你有没有过这种崩溃时刻:

  • 探索性长会话写到一半 → ctx 100% → 强制断 → 一切重来
  • /compact 内置压缩有损,长跑后摘要质量越来越糙
  • /exit 重开 = TaskList / 工作记忆 / cron / 决策全丢
  • 多项目并行,cwd 来回切,状态零散

Continuum 给第三条路

You ──> Claude ──> 工作 ──> ctx 80% ──> 自动压缩 ──> 继续
                              ↓
                            涨到 97%
                              ↓
            Stop hook 自动触发:
            1. snapshot.md (每 turn 累积的事实) → cp 为 HANDOFF.md
            2. 后台 spawn 新 Terminal + 新 claude
            3. 新 claude 启动 prompt: "读 RESUME_INSTRUCTIONS 继续"
            4. 新 claude 自动 TaskCreate 重建任务 → 继续执行
                              ↓
                       老窗口可 /exit

整个过程完全自动。你打字打到一半 ctx 涨到 97%,下一个回复出现在新窗口,TaskList / 近期 commit / 当前进展全部还在。

与 ralph-loop 的区别

维度 ralph-loop(官方) Continuum
解决的问题 Claude 任务做一半就退出 context 满了 session 必须断
触发 用户 /ralph-loop "task" ctx ≥ 97% 自动
会话边界 同会话内反复 跨会话开新窗口接力
Context 满了 撞墙 自动续
适用 有界任务 无界长跑

两者互补,不是替代关系。

67 项改进 + 78 项自检通过

  • 10 轮 retro 迭代(v3.0 → v3.9)
  • 14 个工具脚本
  • 31 项 --self-test(功能验证)
  • 20 项 handoff-doctor(深度诊断)
  • 27 项 audit(含中文路径 / 并发 / 损坏 JSON / 巨大 transcript / 边界值)
  • 8 个即时修复的 bug

关键特性

  • ✅ ctx ≥ 97% 自动 spawn 新窗口
  • ✅ 每 turn snapshot 累积事实(TaskList / git log / 项目状态文件 inline)
  • ✅ 按 cwd hash 隔离多项目,realpath 解析 symlink
  • ✅ session 级 spawn 守门 + 5 分钟 cooldown
  • ✅ snapshot 归档 history/(最近 10 份)
  • ✅ 项目类型自动识别(plan-A/B / iOS / Node / Rust / Python)
  • ✅ 状态栏显示 🔁 链N·Nmin前
  • ✅ chain_depth ≥ 5 自动警告
  • ✅ 20KB snapshot 上限
  • ✅ macOS trust folder 自动跳过

安装

方式 A:Claude Code Plugin

/plugin marketplace add BB20260410/continuum
/plugin install continuum@BB20260410-continuum
/reload-plugins

方式 B:手动安装

git clone https://github.com/BB20260410/continuum.git
cd continuum
./install.sh

验证

~/.claude/bin/handoff-help.sh           # 看所有命令
~/.claude/bin/check-handoff.sh --status # 健康仪表
~/.claude/bin/check-handoff.sh --self-test  # 31 项自检
~/.claude/bin/handoff-doctor.sh         # 20 项深度诊断

价格

  • Continuum(开源 MIT,免费):所有核心功能(GitHub / Anthropic 官方 marketplace)
  • Continuum Pro($19 一次性,即将上线):Web 控制台 + Linux/Windows + 优先支持

详见 PRICING/PRICING.md

系统要求

  • macOS(Terminal.app)
  • Claude Code
  • Python 3.8+
  • ccusage

Linux / Windows: PRs welcome(替换 spawn-claude.sh 的 osascript 调用即可)

License

MIT

致谢

灵感来自 ralph-loop 的 Stop hook 拦截思路。


v3.9.0 — 由 hxx 设计 + Claude Opus 4.7 实现。10 轮迭代,78 项自动测试全过。

About

Claude Code session continuity: auto-handoff when context fills

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages