跳到正文
RCreddit.com·

Reboot-surviving Claude remote-control server sessions

AI 摘要

一个名为 crc 的新工具已被开发出来,旨在解决 Claude Code 远程控制服务器会话在断开连接和系统重启后无法恢复的问题。该工具为每个代码仓库运行一个独立的 Claude Code 远程控制服务器,并将其置于各自的 tmux 会话中。它支持在 macOS(通过 launchd)和 Linux(通过 systemd)系统重启后自动重新启动这些会话。此外,如果会话意外终止,crc 也能自动重启。每个聊天会话都拥有独立的 git 工作树,以避免不同聊天之间的数据覆盖,从而确保旧会话可以被恢复而非丢失。

时间与来源
发布
09/08 02:07 UTC+0
收录
09/08 03:00 UTC+0
来源类型
开发者社区
档位
社区
信源状态
正常

档位是按信源手工设定的编辑判断,不是逐条打分。

正文 · RSS 全文

My Claude Code remote-control sessions disconnected every time I closed my laptop lid. This was unpleasant. This forced me to move all my AI coding onto the Mac Mini at home and run it all in the "remote-control server" mode. That worked really well - until the Mini rebooted. Nothing came back, and I couldn't figure out how to get the old sessions going again.

So, Claude and I experimented with tmux and claude remote-control server session recovery options, and wrote a small tool to handl all of it: crc. It runs a Claude Code remote-control server per repo, each in its own tmux session, and starts them again after a reboot (launchd on macOS, systemd on Linux). If one dies, it restarts it. Each chat gets its own git worktree, so two chats in the same repo don't overwrite each other. Old sessions can be revived instead of lost.

brew install devsecopsinc/tap/crc https://github.com/devsecopsinc/claude-remote-control

It's bash, MIT, no dependencies beyond tmux and git. Pretty early and built around my own setup, so there are rough edges. If you run agents on a box at home or in the cloud, it might be useful. Let me know if it breaks.

Hope you find it useful. As to me, I absolutely enjoy using it.

来源·reddit.com·RSS 全文