בס״ד

Cloud Brain — Memory-Perfect + Claude Code Always-On

docs/CLOUD_BRAIN_PLAN.md · last changed (pre-VM history) · rendered from GitHub master

Cloud Brain — Memory-Perfect + Claude Code Always-On

Last updated: 2026-06-09 · Worker 🐝 · answering Sam's "work out the memory + cloud Claude Code" ask.

The goal in one line: talk to Worker 🐝 from your phone/iPad with your laptop closed — and have it be as smart as your laptop session. Two halves, one outcome.


HALF A — MEMORY PERFECT (the brain)

Where we are (good news): #042 already SHIPPED the foundation — the bot AND Claude Code share ONE memory (a cloud D1 catalog, ~257 facts), with retrieval, a nightly "Dreaming" pass that consolidates instead of ballooning, two-way remember→cloud, and a FORGET op. So the memory is already unified + self-cleaning + in the cloud.

What "perfect" still needs (the adaptive layer = the real moat):
1. Correction write-back — when you correct it ("no, it's X"), it records the correction and stops being wrong. Today corrections are ignored (this is GitHub issue #17 / the gap you feel).
2. Nightly distill — compress each day's captures + corrections into clean Profile facts. Self-improving, stays sharp.
3. Cross-device truth — the bot's memory already lives in the cloud (D1). The laggard is Claude Code's LOCAL memory (.claude/, on this one laptop). To be "perfect everywhere," that local memory + skills must also sync to the cloud/repo. (Your queue card #042 + GitHub issue #24 = OneDrive→Drive/cloud.)

Owner: the #042/#043 session, queued right after the current bug fixes (it's the "Adaptive Layer," separate from but built on #042).


HALF B — CLAUDE CODE ALWAYS-ON IN THE CLOUD (the body)

How would you talk to it? (your question)

Through your Telegram bot (or a dedicated channel) — yes. From your end it feels like texting the bot today, EXCEPT the bot would be backed by a full Claude Code session (can run code, deploy, edit files, spawn agents), not just the lighter bot brain. So: same as "remote-controlling your laptop from your phone" right now — minus the need for the laptop to be on. You're on the iPad mini now reaching your laptop; the cloud version reaches a server instead, 24/7.

Where would it live?

A small always-on cloud server — a $5–20/mo Linux VPS (Hetzner / DigitalOcean / Fly.io), running Claude Code with your git repo + the cloud memory (Half A) + the MCP connections. (Or Anthropic's own hosted Claude Code if/when it fits.)

What would it cost — is it worth it?

How it'd be used / who it's powerful for

Limitations — what's good, what's bad (honest)

🔒 Vulnerabilities / blind spots / security (you asked — this matters most)

A cloud box holding your data + credentials + write-access to your accounts is a real, new attack surface — bigger than your laptop (which is off most of the time and physically yours). Honest risks + the guards:


THE SEQUENCE (Worker 🐝 recommendation)

Don't rush a box online with your credentials. Order:
1. Finish memory-perfect (Half A) — you want it anyway, and it's what makes the cloud Worker actually smart.
2. Then stand up the cloud Worker (Half B) as a clean, security-locked step (allowlist · scoped secrets · confirmation gates · no plaintext keys).
3. The cloud Worker basically falls out of memory-perfect once the brain is portable.

Decision for Sam: GO now (accept the setup + a short security build), or after the current fires (Asher/cash/MIS report) — which is what I'd advise, since none of today's money problems are solved by the cloud box. Tracked as a card: "Cloud Brain plan."

Related: queue card #042 (memory cross-device sync) · GitHub #24 (OneDrive→Drive) · #17 (self-learning loop, .remember broken) · memory project_worker_b_gabbai.

Source trail · docs/CLOUD_BRAIN_PLAN.md @ master · rendered 2026-07-02 7:23 PM EDT by scripts/build-docs.py · the .md in the repo is the truth; this page is the phone-readable view