我把 coding agent 搬进了手机,合盖它接着跑
上一篇让几个 Claude 账号自己换着用,人还是拴在电脑前。这一篇把最后一根绳也剪了: agent 全跑在一台常开的机器上,手机随时连上去看和指挥,合盖、出门、躺床上,它照跑不误。 三个开源件各管一段——herdr 管会话、hcom 管通讯、Moshi 管手机——外加账号自动轮换兜底, 凑成我目前跑得最顺的移动端 vibe coding 方案。这篇讲怎么搭,也讲踩过的坑。
上一篇让几个 Claude 账号自己换着用,人还是拴在电脑前。这一篇把最后一根绳也剪了: agent 全跑在一台常开的机器上,手机随时连上去看和指挥,合盖、出门、躺床上,它照跑不误。 三个开源件各管一段——herdr 管会话、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 用户的老问题:五小时用量墙说撞就撞,切号还得重新登录、丢掉正在跑的会话。 我做了一套工具解决它:clauth fork 负责在活跃会话底下无感热切换 + 无人值守自动轮换, 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.
一份可以直接交给 Claude Code 执行的自建代理手册。覆盖 sing-box 多协议部署(VLESS-Reality / Hysteria2 / TUIC-v5)、SSL 证书、nginx 订阅服务器、动态流量统计,以及 Clash Verge / Shadowrocket 客户端配置。替换占位符,扔给 Agent,开跑。
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.
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