I work from two computers β a desktop during the day, a laptop at night. Both run Claude Code. Both need to know what the other one did. For months the answer was "tell the second machine what you did on the first," which is exactly the kind of chore that eventually kills a workflow.
This is the setup that finally replaced all the manual context-passing. It's not clever, but it works, and I haven't lost a thread in about six weeks.
My name is Fillip Kosorukov. I'm a solo founder building a couple of SaaS products, none of which would ship without AI-assisted coding. Everything here runs on Ubuntu, Python 3, and a small pile of shell scripts.
Claude Code has session memory inside a given conversation, and per-project CLAUDE.md files that travel with the repo. What it doesn't have, out of the box, is a durable cross-machine working memory β the sort of thing where you can tell it "we decided X yesterday on the other computer" and it already knows.
My fix has three parts:
~/knowledge/
)The ritual takes less than a minute on either machine and gives the assistant a useful cold-start state.
~/knowledge/
βββ INDEX.md
βββ CHANGELOG.md # append-only, every agent writes when finishing meaningful work
βββ scratch.md # Karpathy append-and-review note
βββ meta/
β βββ sources-of-truth.md # which file owns which category of information
βββ <project>/
β βββ rules.md # durable behavior rules
β βββ hypotheses.md # unconfirmed patterns
β βββ knowledge.md # confirmed facts
β βββ decisions/YYYY-MM-DD-topic.md
β βββ raw/ # ingested source material
Nothing special. Markdown I can grep. That's the point. When I want to know whether a fact exists, I can ripgrep the tree from any machine in any shell.
The VPS is the source of truth. Desktop and laptop are clones. Git does the heavy lifting.
On each machine there's a hook that fires when a Claude Code session ends. It runs:
cd ~/knowledge
git add -A
git diff --cached --quiet || git commit -m "auto-commit: session end $(date -I)"
git push origin main 2>/dev/null
A 2-hour cron catches anything the hook missed (sessions that crash, SSH disconnects, etc.):
0 */2 * * * bash ~/scripts/push_knowledge.sh
And before I start meaningful work on either machine, I run git pull
on the knowledge directory. The assistant reads the CHANGELOG first when it boots into a project, so the last thing either machine did is always in context.
Sync alone doesn't save you. The knowledge base has to not rot, or all you're syncing is garbage. Two rules have been load-bearing for me:
One home per fact. Every category of information lives in exactly one file. If a fact belongs in localmention/rules.md
, it does not also live in a global memory, a skill definition, or a note somewhere. The meta/sources-of-truth.md
index tells agents (and me) where each category of knowledge lives. Without this, you'll end up with three slightly divergent copies of the same fact and no way to tell which is current.
Two outputs per task. Every substantial piece of work produces both the code change AND a knowledge update. Together. In the same session. Not deferred. This is the single rule that separates knowledge bases that grow from knowledge bases that stagnate after the first three weeks.
One file in the knowledge tree does disproportionate work: scratch.md
. It's an append-and-review note in Andrej Karpathy's original style, adapted for AI-assisted coding.
Rules:
Capture is fast because no classification decision is required. Classification happens later, during review, with more information. Most entries end up being deleted as noise. The real patterns resurface across multiple reviews and earn promotion.
Starting this file was the single highest-return change I made to the whole setup.
A few things I got wrong along the way so you don't have to:
~/.git-hooks
on my box; per-repo .git/hooks/
are inert. Systemd services with ProtectHome
can't write outside their ReadWritePaths
. Check git config --get core.hooksPath
and systemctl cat <service>
before editing.canonical_url
pointing back. Google ranks the original correctly and the secondaries pull traffic to it.I close my laptop at 11 PM. The knowledge directory auto-commits and pushes. Next morning I sit down at the desktop, git pull
, start a Claude Code session, and the assistant boots with a CHANGELOG that already tells it what I decided last night. Six weeks in, I haven't lost a thread.
If you're running AI-assisted coding across multiple machines, I'd skip every proprietary memory feature and start with a git-synced Markdown tree. It's boring. That's the point.
Fillip Kosorukov is a solo founder in Indianapolis. More at fillipkosorukov.net.