Skip to content

allow syncing of claude memories - #255

Open
Neolithic wants to merge 4 commits into
gofixpoint:mainfrom
Neolithic:main
Open

allow syncing of claude memories#255
Neolithic wants to merge 4 commits into
gofixpoint:mainfrom
Neolithic:main

Conversation

@Neolithic

Copy link
Copy Markdown

No description provided.

Neolithic and others added 4 commits June 23, 2026 16:51
beta:push now uploads the Claude memory files
(~/.claude/projects/<project>/memory/*.md) of every project amikalog has
captured Claude sessions for, under the same "<repo>/" key prefix as that
project's sessions ("<repo>/memory/<file>.md").

Memory files are edited in place, unlike append-only session JSONL, so they
can diverge between this machine and the cloud copy other machines pushed. A
dedicated manifest records each file's last-synced content hash and a 3-way
rule decides per file: no cloud copy or only-local change uploads, only-cloud
change pulls the cloud copy down, identical skips, and a file changed on both
sides is merged with the host claude CLI, written back locally, and uploaded.
A failed or unavailable merge never clobbers either side; if claude is not
installed, diverged files are skipped with a warning while the rest upload.

Adds eventlog.Downloader, apiclient.GetObjectByKey for single-object reads,
and a --skip-memories flag.
Uploading Claude memory files is now off by default: beta:push uploads only
captured events unless --memories is passed. This keeps memory upload behind an
explicit flag while it is being tested, before considering it as a default.

Add --all-projects (requires --memories) to also upload memory for projects
that have no captured amikalog session. The repository prefix for such a project
is recovered from its own Claude transcript working directory and that
directory's git repo, falling back to "unknown-repo".

Replaces the previous --skip-memories flag.
GetObjectByKey listed the downloads endpoint with the full object key as
the `prefix`, then exact-matched. The storage backend treats a listing
prefix as a folder path, so a prefix that includes the filename matches
nothing and the lookup always reported found=false.

That made `amikalog beta:push --memories` re-upload every memory file on
every run: reconcileMemory always took the "no cloud copy yet" branch
because the cloud read-back never found the object, regardless of the
local push manifest. Session/event uploads were unaffected because they
dedup via the byte-size manifest and never call GetObjectByKey.

List the object's parent folder (up to and including the final "/") and
exact-match within it. Add regression tests that fake the downloads
endpoint with folder-prefix semantics; they fail against the old
full-key listing and pass with the fix.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant