Repository navigation
Conversation
mem::claude-bridge-sync writes Claude Code's project MEMORY.md, the index a user or Claude Code curates by hand, and replaced it in full with no check and no backup. Sync now writes only when the file is missing, empty, or starts with the bridge's own auto-sync header; otherwise it leaves the file untouched, logs a warning and returns success: false with the reason. Signed-off-by: Rex57 <203883624+Rex57@users.noreply.github.com>
|
@Rex57 is attempting to deploy a commit to the rohitg00's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit detailsLimit details: You’ve used all 10 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1490.
With
CLAUDE_MEMORY_BRIDGE=true,mem::claude-bridge-sync(also the default direction of thememory_claude_bridge_syncMCP tool) writes~/.claude/projects/<slug>/memory/MEMORY.md, which is Claude Code's own project memory index, often curated by hand. It replaced that file in full withwriteFileSync, with no check and no backup.Sync now writes only when the file:
# Agent Memory (auto-synced by agentmemory).For any other file it writes nothing, logs a warning, and returns:
{ "success": false, "error": "<path> holds content agentmemory did not write, so the bridge will not overwrite it. Move that content elsewhere first if agentmemory should own this file." }The read direction is unchanged. The header is now one constant shared by the serializer and the check.
Checks
test/claude-bridge.test.ts: rewrites its own file; creates a missing file; leaves a hand-written file untouched with the error; replaces an empty file. The existing sync test now states that the old file came from the bridge.npm run build,npm run skills:gen,npm run docs:sync(no changes),npm run skills:checknpm test: 2597 passed, 4 skipped