Local Codex session search using SQLite FTS5.
It imports ~/.codex/sessions/**/*.jsonl into a local SQLite database, indexes messages as small overlapping chunks, and lets Codex retrieve only the relevant context instead of loading whole old sessions.
git clone https://github.com/ponchoalv/codex-memory.git
cd codex-memory
./install-codex-skill.shThe installer builds:
~/.local/bin/codex-memory
And installs the Codex skill at:
~/.codex/skills/codex-memory/SKILL.md
Start a new Codex session after installing so the skill registry can pick it up.
codex-memory sync
codex-memory search "kustomer shortcuts" -limit 5
codex-memory show "<ref>" -around 1
codex-memory usage "token usage" -limit 5Search and usage queries are safely quoted by default, so UUIDs, hyphenated service names, and punctuation can be pasted directly. Use -raw only when you intentionally want SQLite FTS5 query syntax.
Data is stored at:
~/.local/share/codex-memory/memory.sqlite
sync imports new Codex session messages.
search returns matching chunks and stable ref pointers.
show expands context around a returned ref.
usage estimates retrieved chunk tokens versus full-message tokens with a simple chars / 4 heuristic.
This is intentionally boring: Go single binary, SQLite FTS5, no embeddings, no background daemon.