我把 coding agent 挪到常开机器上,手机随时指挥
上一篇让几个 claude 账号自己换着用,人还是拴在电脑前。这一篇把 agent 全挪到一台常开的机器上,手机随时连上去看进度、派新活,笔记本合盖它也接着跑。三个开源件各管一段——herdr 管 session、hcom 管通讯、Moshi 管手机——外加账号自动轮换兜底,凑成我目前跑得最顺的移动端 vibe coding 方案。这篇讲怎么搭,也讲踩过的坑。
上一篇让几个 claude 账号自己换着用,人还是拴在电脑前。这一篇把 agent 全挪到一台常开的机器上,手机随时连上去看进度、派新活,笔记本合盖它也接着跑。三个开源件各管一段——herdr 管 session、hcom 管通讯、Moshi 管手机——外加账号自动轮换兜底,凑成我目前跑得最顺的移动端 vibe coding 方案。这篇讲怎么搭,也讲踩过的坑。
Last time I taught a few Claude accounts to rotate themselves — but I was still chained to my laptop. This time I cut the last cord: the agents live on an always-on box, and my phone connects in to watch and steer them. Close the lid, leave the house, lie in bed — they keep running. Three open-source pieces each own one layer — herdr the sessions, hcom the messaging, Moshi the phone — plus account auto-rotation as the safety net. The mobile vibe-coding setup that currently runs smoothest for me: how to build it, and the traps I hit.
天天用 claude code 的人都撞过五小时用量墙,切号还要重新登录,正在跑的 session 也会丢。 我搞了两个工具:clauth fork 在活跃 session 底下做无感热切换和无人值守自动轮换, 菜单栏的 ccsbar 把每个账号的余量、预报和健康状况摆在明面上。这篇讲这套东西是怎么搭起来的。
I run several Claude accounts and kept hitting the 5-hour wall mid-session. Switching meant logging out. So I built a daemon that hot-swaps the active login under a running session — and the whole thing turned on one non-obvious fact about how macOS stores an auth token.
A runbook you can hand directly to Claude Code to execute. Covers sing-box multi-protocol deployment (VLESS-Reality / Hysteria2 / TUIC-v5), SSL certificates via Cloudflare DNS API, nginx subscription server with dynamic traffic stats, and Clash Verge / Shadowrocket client configuration. Replace the placeholders, hand it to your agent, hit go.
一份可以直接交给 Claude Code 执行的自建代理手册。覆盖 sing-box 多协议部署(VLESS-Reality / Hysteria2 / TUIC-v5)、SSL 证书、nginx 订阅服务器、动态流量统计,以及 Clash Verge / Shadowrocket 客户端配置。把占位符换成自己的,发给 agent 让它按步骤执行就行。
32GB 的 GCP 开发机——经过第三篇的升级和加固之后——又死了。一样的症状:SSH 超时,内核活着,用户态冻结。看门狗抓到了:五个 node 进程各占 2-2.7GB,合计约 13GB。我以为是 Claude Code,结果是 Cursor 远程服务器连续泄漏了 15 个小时。
The 32GB GCP devbox — upgraded and hardened after Part 3 — died again. Same symptom: SSH timeout, kernel alive, userspace frozen. The watchdog caught it: five node processes at 2-2.7GB each, totaling ~13GB. I assumed Claude Code. It was Cursor's remote server leaking memory for 15 hours straight.
GCP 开发机一天死了两次。第一次是 snap 包引发的无限崩溃循环,修完五项加固以为稳了。几小时后又死了——这次是内存管理的问题。Claude Code 两轮诊断、12 项加固、最后连机型都换了。一次关于 VM 运维纵深防御的完整记录。
My GCP devbox died twice in one day. First time: a snap package triggered an infinite crash loop. Applied five fixes, thought it was stable. Hours later it died again — unbounded memory was the real issue. Two rounds of diagnosis, 12 hardening measures, and a machine type swap. A complete field report on VM defense in depth.
用了好几年商业 VPN,终于决定自己搭。一个下午、一台 VPS、全程 Claude Code。中间 Shadowsocks 被封、证书申请踩坑,但最后搭出来的东西比我预期的完整得多。
After years of commercial VPN services, I decided to self-host. One afternoon, one VPS, Claude Code doing all the work. Shadowsocks got blocked within hours, the cert saga had three false starts, but what came out the other side was more complete than I expected.
© Xingfan Xia 2024 - 2026 · CC BY-NC 4.0