1 comment

[ 5.7 ms ] story [ 16.6 ms ] thread
I built Cortex to solve the most frustrating part of AI coding assistants: session boundary amnesia.

  You spend 2 hours with Claude Code. It understands your codebase, knows why you rejected MongoDB, remembers your authentication decisions. Then the session ends. Total amnesia.

  Cortex is an event-sourced memory system that captures context automatically and projects it into each new session:

  - Three-layer extraction: structural (tool calls), semantic (decision patterns), self-reporting ([MEMORY:] tags)
  - Token-budget-aware briefings (~0.2% of context window)
  - Progressive tiers: JSON → SQLite/FTS5 → embeddings/vector search → MCP server

  A/B testing results (18 vs 11 sessions):
  - Cold start: 9.0 min → 1.4 min (84% reduction)
  - Decision regression: 0.5 → 0.1 per session (80% reduction)
  - Continuity score: 2.9 → 4.7 (out of 5)

  713 tests. Python. Open source.

  GitHub: https://github.com/As-The-Geek-Learns/cortex