You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filed alongside #668 (forward-reference bootstrap fix). I've been running gbrain as an AI agent's persistent memory layer (Claude Code + Codex CLI sharing the same brain), and over time identified eight gaps that would make gbrain materially more useful in that role. I've prototyped all eight in a fork — happy to PR as separate units once we agree on direction.
gbrain import --purge-deleted flag finds pages whose source_path falls under the import dir but whose underlying file no longer exists, and cascade-deletes them
Solves the "agent renamed/deleted a memory file, brain still has the orphan" class of issue
gbrain import path/to/single-file.md works (currently requires a directory)
Plus a CLAUDE.md / AGENTS.md hook pattern for SessionEnd flush — the agent writes a memory file mid-session, single-file import lands it without rescanning
That branch is currently 12 commits behind master (predates v0.26 OAuth + admin dashboard), so a clean rebase is real work. Filing this Issue now to get architectural feedback BEFORE I spend the time porting forward. If the proposal lands, I'll follow up with PRs in this order:
The shape of "AI agent's memory" is converging across Claude Code, Codex CLI, Cursor, and the rest. Today every agent is wiring up its own ad-hoc solution (~/.claude/projects/.../memory/*.md, Codex's transcript tail, etc.). gbrain is uniquely positioned to be the shared substrate — agent-agnostic, locally-private-by-default, queryable. The eight gaps are the seams I hit when wiring Claude Code memory through gbrain. Other agent users will hit the same seams.
Happy to discuss scope, reorder, or split. Looking for a thumbs up before I invest in the rebase + PR series.
Context
Filed alongside #668 (forward-reference bootstrap fix). I've been running gbrain as an AI agent's persistent memory layer (Claude Code + Codex CLI sharing the same brain), and over time identified eight gaps that would make gbrain materially more useful in that role. I've prototyped all eight in a fork — happy to PR as separate units once we agree on direction.
The eight gaps
Gap #1 — Privacy enforcement
--respect-sensitivityflag ongbrain importhonors asensitivity: public | project | privatefrontmatter fieldmemory/private/skip-directory ruleGap #1.5 — Source-aware CRUD
getPage/putPage/deletePageaccept an optionalsourceIdparameter (currently route through default)gbrain import --source <id>auto-registers the source if it doesn't exist (today the--sourceflag is silently dropped — see import.ts)Gap #3 — Source-path tracking on pages
pages.source_path TEXTcolumn captures the on-disk origin filerowToPage,importFromFileGap #4 — Audit-aware delete reconciliation
gbrain import --purge-deletedflag finds pages whosesource_pathfalls under the import dir but whose underlying file no longer exists, and cascade-deletes themGap #5 — Single-file
gbrain importgbrain import path/to/single-file.mdworks (currently requires a directory)Gap #6 — SessionStart
briefMCP operationquery— this is "what's important in my brain right now" not "answer this question"Gap #7 —
gbrain auditcommandgbrain audit [--fix]detects four classes of brain pathology:source_pathpoints at a file that no longer existssource_pathexists but content_hash no longer matches the file (someone edited the file but didn't re-import)Gap #8 — Backfill gate (docs)
Reference implementation
All eight gaps prototyped on a fork branch: https://github.com/mdcruz88/gbrain/tree/michael/adr-001-hybrid-memory
That branch is currently 12 commits behind master (predates v0.26 OAuth + admin dashboard), so a clean rebase is real work. Filing this Issue now to get architectural feedback BEFORE I spend the time porting forward. If the proposal lands, I'll follow up with PRs in this order:
briefMCP op (Gap SQLite integration #6)Why this matters for gbrain's broader user base
The shape of "AI agent's memory" is converging across Claude Code, Codex CLI, Cursor, and the rest. Today every agent is wiring up its own ad-hoc solution (
~/.claude/projects/.../memory/*.md, Codex's transcript tail, etc.). gbrain is uniquely positioned to be the shared substrate — agent-agnostic, locally-private-by-default, queryable. The eight gaps are the seams I hit when wiring Claude Code memory through gbrain. Other agent users will hit the same seams.Happy to discuss scope, reorder, or split. Looking for a thumbs up before I invest in the rebase + PR series.
🤖 Generated with Claude Code