Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Lakebase-backed persistent memory for CODA sessions

Open
#14 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Quiet
Tech stack
postgres, python

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_pool with an OAuthConnection subclass 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 the memory-recall subagent.
  • 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databrickslabs/coding-agents-databricks-apps

All issues in databrickslabs/coding-agents-databricks-apps

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.