Cortex

Persistent local memory for Claude Code. Longer sessions. Cross-session recall. Zero cloud.
Ψ 47 ●●○○○ 45% ✓ 5m
Why Cortex?
| Problem | Cortex Solution |
|---|
| Session limits hit mid-task | Auto-save on context step (5%) & session end |
/clear wipes everything | SQLite persistence survives clears |
| Re-explaining context every session | Hybrid search recalls relevant memories |
| Cloud memory privacy concerns | 100% local — ~/.cortex/memory.db |
Requirements
- Node.js: 18.0.0 or higher
- Disk Space: ~500MB (Includes 150MB embedding model cache + database growth)
- OS: macOS or Linux (Windows supported via WSL2)
Install
Inside a Claude Code instance:
Step 1: Add the marketplace
/plugin marketplace add hjertefolger/cortex
Step 2: Install the plugin
⚠️ Linux users: Click here first
On Linux, /tmp is often a separate filesystem (tmpfs), which causes plugin installation to fail with:
EXDEV: cross-device link not permitted
Fix: Set TMPDIR before installing:
mkdir -p ~/.cache/tmp && TMPDIR=~/.cache/tmp claude
Then run the install command below in that session.
/plugin install cortex
Step 3: Run the setup wizard
Ask Claude to run the setup skill:
Please setup Cortex (or run /cortex-setup manually)
The wizard will initialize the database, download the embedding model, and configure the statusline.
Step 4: Customize settings
Ask Claude to configure your preferences:
Please configure Cortex (or run /cortex-configure manually)
Done! Restart Claude Code to activate the statusline.
🔄 Updating
To update Cortex to the latest version:
Step 1: Update the marketplace
/plugin marketplace update cortex
Step 2: Update the plugin
/plugin update cortex
Step 3: Run the setup wizard
Ask Claude to run the setup skill:
Please setup Cortex (or run /cortex-setup manually)
The wizard will install dependencies and download the embedding model for the new version. Your memories and configuration in ~/.cortex/ are preserved.
Step 4: Restart Claude Code to load the new version.
Note: Due to a known Claude Code issue,
always update the marketplace first. After restart, you can ask Claude to verify
the update by checking if the cached plugin matches the latest release.
Statusline
The statusline is configured automatically by /cortex-setup. Restart Claude Code after setup to see it.
Ψ 47 ●●○○○ 45% ✓ 5m
Ψ — Cortex identifier
47 — Memory fragment count (compact: 1.1K, 10.2M, etc.)
●●○○○ — Context usage (filled/empty circles, color-coded)
45% — Context percentage
⠋ Saving — Animated spinner during background save
✓ Autosaved — Success indicator (shows for ~5s after save)
✓ 5m — Time since last save
Architecture