Skip to content

Add cross-run memory system with SQLite+FTS5 storage#2

Merged
antonio2368 merged 8 commits intomasterfrom
memory-support
Mar 19, 2026
Merged

Add cross-run memory system with SQLite+FTS5 storage#2
antonio2368 merged 8 commits intomasterfrom
memory-support

Conversation

@antonio2368
Copy link
Member

Introduces a persistent memory system that recalls relevant context from previous runs and extracts new memories (decision, observation, summary, principle) post-run via LLM. Includes TUI management screen (M key), headless support (--no-memory), configurable recall/extraction, resume awareness, and per-run artifacts (_recalled_memories.md, _memories.json).

antonio2368 and others added 4 commits March 17, 2026 17:05
Introduces a persistent memory system that recalls relevant context from
previous runs and extracts new memories (decision, observation, summary,
principle) post-run via LLM. Includes TUI management screen (M key),
headless support (--no-memory), configurable recall/extraction, resume
awareness, and per-run artifacts (_recalled_memories.md, _memories.json).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Introduce a separate info_modal (green) for success messages like config
save, replacing the misleading red error_modal. Consolidate duplicate
draw_error_modal functions from home.rs and pipeline.rs into a single
draw_modal in screen::mod.rs rendered globally on every screen. Hide
cursors when any modal is shown to prevent bleed-through.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds a Memory section to the edit popup (Tab-accessible alongside
Agents and Timeouts) allowing users to view and modify all memory
config fields at runtime. Toggle fields (enabled, disable_extraction)
use Space; numeric/string fields use inline text editing. Session
overrides are tracked separately and merged on save, with the save
handler now returning the exact saved config to eliminate races.
Also updates agent rename/remove to follow extraction_agent references,
locks the popup during in-flight saves, and adds comprehensive tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
antonio2368 and others added 4 commits March 18, 2026 22:09
…gement UI

- Add recall tracking: memories record how often and when they were last
  recalled, with two-phase commit to avoid false positives on setup failure
- Rebuild FTS5 index with Porter stemming for better recall quality;
  hyphenated terms split into segments with prefix wildcards for longer tokens
- Add schema migration system (v0→v5) with transactional DDL migrations
- Memory screen: bulk delete (D, two-press confirm), "never recalled" filter
  (r), DB size display, recall count/last-recalled in detail view
- Unify extraction agent resolution across TUI, headless, and home screen
- Headless: structured JSON warnings for memory store errors

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Previously clear_history() was only called between iterations but not
between loop pass advances (loopback), causing providers to accumulate
conversation history across all loop passes even with keep_session=false.

Also fix pre-existing clippy::useless_format lint in memory/store.rs
and update pre-commit hook to match CI flags (--all-targets --all-features).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…earing

The keep_session_across_iterations flag is now iteration-scoped only, as
originally designed. A new keep_across_loop_passes flag (default: true)
independently controls whether provider history is cleared between loop
pass advances within a single iteration.

UI updated with two toggle columns (Iter/Loop) navigable with h/l keys.
Help screen and README updated to document the new setting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add archived column (schema v6) with auto-archival of stale permanent
  memories (decisions/principles) after configurable days without recall
- Prioritize finalization/consolidation files in extraction prompt budget
- Return extraction count from headless mode for better reporting
- Increase default max_recall (15→20), max_recall_bytes (8K→16K),
  observation_ttl_days (90→120)
- Add archived view toggle (a) and unarchive (u) keys to memory management
- Auto-unarchive decisions when re-extracted as duplicates

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@antonio2368 antonio2368 merged commit 0d4c452 into master Mar 19, 2026
4 checks passed
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