Lakebase-backed persistent memory for CODA sessions
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
Research direction
Start with setup_memory.py and the tests in tests/test_memory_*.py, then read memory/extractor.py, memory/store.py, memory/injector.py, and memory/searcher.py to understand the session flow. Done means the Stop hook extracts structured memories, persists them in coda_memories, regenerates coda_memory.md, and the documented tests pass without breaking hook registration.
Written by the indexing model from the issue text.
Description
Summary
Adds Lakebase-backed persistent memory to CODA. Migrating from datasciencemonkey PR #145.
At session end, a Stop hook extracts 3–8 structured memories from the Claude transcript via the Databricks Claude Haiku serving endpoint, persists them to a coda_memories Postgres table, and regenerates coda_memory.md so the next session opens with the accumulated context already loaded.
Components
memory/extractor.py— Stop hook: parses the JSONL transcript, calls Haiku, writes to Lakebase, regenerates the local memory file.memory/store.py—psycopg 3+psycopg_poolwith anOAuthConnectionsubclass that mints a fresh Lakebase OAuth credential on every pool recycle (45 min, ahead of the 1h token expiry). Follows the canonical Databricks Apps + Lakebase Autoscaling pattern.memory/injector.py— Regenerates~/.claude/memory/coda_memory.md(or project-scoped variant) from Lakebase.memory/searcher.py— FTS-ranked search CLI used by thememory-recallsubagent.memory/hooks/user_prompt_submit.py— Zero-cost nudge so Claude knows to invoke the subagent when historical context would help.setup_memory.py— Per-session schema init, memory-file warm-up, idempotent hook registration.
Schema
coda_memories: content_hash UNIQUE for dedup, content_tsv generated column + GIN index for FTS, nullable vector(1536) + HNSW (kept off by default — semantic search comes later).
Branch
feat/lakebase-memory — about to be pushed.
Diff scope
+6581 / -10, 36 files. Tests in tests/test_memory_*.py.
Follow-ups
- Embedding ingestion + MMR retrieval (vector column is in place, query side isn't yet).
- Memory decay / TTL.
- Multi-tenant scoping (currently single-user).
- Dominant language
- Python
- Stars
- 40
- Forks
- 11
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from databrickslabs/coding-agents-databricks-apps
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in databrickslabs/coding-agents-databricks-apps
Similar issues
-
agent-ready documentation needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
instance instance add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
searxng/searx-instances#939 · 1 comment ·
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100