Skip to content

Conversation

@russellbrenner
Copy link

Summary

Adds Claude Code integration via hooks and a migration script for users coming from claude-mem.

  • SessionStart hook - queries OpenMemory for project-relevant context at session start
  • Stop hook - stores session summaries automatically
  • CLAUDE.md.example - template instructions for Claude to use the MCP tools effectively
  • import-claude-mem.js - migration script for claude-mem SQLite databases

Both hooks fail silently with 3-second timeouts when OpenMemory isn't running.

Disclosure

This PR was authored with assistance from Claude (Anthropic). The hooks and documentation were developed iteratively based on actual usage. Happy to adjust anything to fit the project's direction.

Files

hooks/
├── openmemory-session-start.sh  # Injects context at session start
├── openmemory-session-stop.sh   # Stores session summaries
├── README.md                     # Installation instructions
└── CLAUDE.md.example            # MCP tool usage guide for Claude

scripts/
└── import-claude-mem.js         # Migrate from claude-mem

Test plan

  • Tested hooks with local OpenMemory instance
  • Verified silent failure when Docker not running
  • Tested import script with real claude-mem database

🤖 Generated with Claude Code

russellbrenner and others added 2 commits January 14, 2026 00:16
- Fix openmemory-js Dockerfile: replace Bun with npm (no bun.lockb exists)
- Add NODE_OPTIONS for increased heap size during TypeScript compilation
- Restore dashboard app from git history (removed in Beta 1.3.0)
- Update docker-compose.yml to re-enable dashboard service

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add SessionStart hook to query project context at session start
- Add Stop hook to store session summaries
- Both hooks fail silently if OpenMemory/Docker unavailable
- Include CLAUDE.md.example with comprehensive MCP tool documentation
- Add import-claude-mem.js for migrating claude-mem databases

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings January 13, 2026 14:22
Use jq to build JSON output instead of bash substring expression
that fails on some bash versions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Claude Code integration hooks and a comprehensive dashboard for OpenMemory, enabling automatic memory capture during development sessions and providing visual analytics for memory management.

Changes:

  • Added session start/stop hooks for automatic memory integration with Claude Code
  • Created a Next.js dashboard with memory analytics, chat interface, and system monitoring
  • Provided migration tooling for users coming from claude-mem
  • Switched Docker build from Bun to npm with increased Node.js heap size

Reviewed changes

Copilot reviewed 33 out of 36 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
scripts/import-claude-mem.js Migration script to import memories from claude-mem SQLite database
packages/openmemory-js/Dockerfile Changed build system from Bun to npm with heap size optimization
hooks/openmemory-session-stop.sh Bash script to capture session summaries at Claude Code session end
hooks/openmemory-session-start.sh Bash script to inject relevant context at Claude Code session start
hooks/README.md Installation and configuration guide for Claude Code hooks
hooks/CLAUDE.md.example Template documentation for Claude to use OpenMemory MCP tools
docker-compose.yml Removed obsolete version specification
dashboard/* Complete Next.js dashboard implementation with memory visualization and chat interface

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# OpenMemory Dashboard Configuration
NEXT_PUBLIC_API_URL=http://localhost:8080
# Set this if your backend has OM_API_KEY configured for authentication
NEXT_PUBLIC_API_KEY=your No newline at end of file
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The API key value 'your' is incomplete and ambiguous. It should either be 'your-api-key-here' or include a comment indicating this is a placeholder that needs to be replaced with an actual API key.

Suggested change
NEXT_PUBLIC_API_KEY=your
NEXT_PUBLIC_API_KEY=your-api-key-here

Copilot uses AI. Check for mistakes.
AWS_REGION: {
category: 'API Keys',
label: 'AWS Region',
description: 'Region aws (us-east-1 prefered)',
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected spelling of 'prefered' to 'preferred'.

Suggested change
description: 'Region aws (us-east-1 prefered)',
description: 'Region aws (us-east-1 preferred)',

Copilot uses AI. Check for mistakes.
russellbrenner and others added 2 commits January 14, 2026 12:31
- Add NODE_OPTIONS=--max-old-space-size=128 to Dockerfile production stage
- Document memory tuning in README for users needing larger heaps
- Default 128MB provides ~4x headroom over minimal Node.js heap

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The previous 128MB limit caused 96% memory pressure during normal
operations. Increased to 512MB to provide headroom for vector
operations and embedding storage.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@nullure
Copy link
Member

nullure commented Jan 15, 2026

Hi Russell, thank you for your contribution! This helps us a lot, but I don't understand why there is a neccesity for frontend files here

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.

2 participants