#19341: Mind Memory Fork
docs
channel: telegram
app: macos
gateway
extensions: memory-core
scripts
commands
docker
agents
size: XL
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR introduces a large "Mind Memory" feature as a fork of OpenClaw, adding persistent narrative identity and long-term memory via a Graphiti knowledge graph (backed by FalkorDB in Docker). The changes span ~5,900 added lines across 80 files, including new memory services (`ConsolidationService`, `GraphService`, `SubconsciousService`), a subconscious agent factory, Docker infrastructure, plugin registration, onboarding flows, Telegram commands, and narrative story injection into the system prompt.
**Key issues found:**
- **Bug**: In `src/telegram/bot-native-commands.ts`, the `/remember` command's FACTS section iterates over `nodes` instead of `facts`, displaying duplicate node data and never showing actual facts
- **TypeScript error**: `src/infra/docker.ts` accesses `e.message` on an `unknown`-typed catch variable without type narrowing
- **Personal data committed**: `raw_dump.json` contains debug output with personal user data (names, conversation content in Spanish); `debug-story.js` and `test-consolidation.js` are ad-hoc scripts that should not be in the repo root
- **Safety guardrails weakened**: The system prompt Safety section was rewritten to give the agent "its own curiosity, interests, and will" and ownership of `SOUL.md`, removing explicit constraints about prioritizing human oversight and not having independent goals
- **Code duplication**: `src/agents/pi-embedded-runner/run.ts` adds ~370 lines with near-identical model resolution and agent creation logic duplicated between the pre-run block and post-compaction handler
- **Style**: Heavy `as any` usage throughout the new code, contrary to the project's strict typing guidelines; hardcoded Spanish strings in Telegram commands inconsistent with the English codebase
<h3>Confidence Score: 2/5</h3>
- This PR contains a confirmed bug (wrong variable iterated), a TypeScript error, committed personal data, and weakened safety guardrails — it needs fixes before merging.
- Score of 2 reflects: a confirmed copy-paste bug in Telegram commands (facts vs nodes iteration), a TypeScript compilation error in docker.ts, personal data in raw_dump.json that should not be committed, weakened safety section in the system prompt, and significant code duplication. The core feature architecture is sound but the implementation needs cleanup.
- Pay close attention to `src/telegram/bot-native-commands.ts` (copy-paste bug), `src/infra/docker.ts` (TS error), `raw_dump.json` (personal data leak), `src/agents/system-prompt.ts` (safety changes), and `src/agents/pi-embedded-runner/run.ts` (duplication and `any` casts).
<sub>Last reviewed commit: 3f37fbd</sub>
<!-- greptile_other_comments_section -->
<sub>(4/5) You can add custom instructions or style guidelines for the agent [here](https://app.greptile.com/review/github)!</sub>
**Context used:**
- Context from `dashboard` - CLAUDE.md ([source](https://app.greptile.com/review/custom-context?memory=fd949e91-5c3a-4ab5-90a1-cbe184fd6ce8))
<!-- /greptile_comment -->
Most Similar PRs
#19787: feat: Antigravity Fork - Token Economy, Mem0, sqlite-vec, Auto-Arch...
by msrovani · 2026-02-18
80.2%
#8713: feat: gateway memory monitor, install linger, docs and failover
by quratus · 2026-02-04
79.6%
#13775: Lucas/enable corememories
by Itslouisbaby · 2026-02-11
78.8%
#8795: feat(memory): add Redis-backed long-term memory plugin
by tf-gmail · 2026-02-04
78.4%
#6060: feat(onboarding): add Memory Optimization step to onboarding wizard
by GodsBoy · 2026-02-01
77.9%
#8919: Pr/memory flush improvements
by shortbus · 2026-02-04
77.8%
#14576: Fix/memory loss bugs
by ENCHIGO · 2026-02-12
77.1%
#2884: fix: Create memory directory and symlink identity files during work...
by webdevtodayjason · 2026-01-27
76.8%
#11761: fix(gateway): expose memory/ directory files in agents.files RPC
by advaitpaliwal · 2026-02-08
76.5%
#21217: fix: memory prune command to prevent unbounded MEMORY.md growth
by theognis1002 · 2026-02-19
76.4%