Currently context-mode stores data in platform-specific directories under ~/.{platform}/context-mode/ (e.g. ~/.pi/, ~/.claude/), split across two locations:
- Session events → adapter-detected platform dir
- Content index (FTS5 BM25) → always
~/.claude/context-mode/content/
- Session stats →
~/.claude/context-mode/sessions/
For users running non-native harnesses (e.g. Oh My Pi/OMP which shares the Pi adapter path), or users who want all context-mode data in a single custom directory, there is currently no way to redirect storage.
Request: Add one or more environment variables to override storage paths.
Preferred approach — single root env var:
CONTEXT_MODE_DIR=~/.omp/context-mode
This would redirect all three (session events DB, content index, session stats) under that root. Falls back to the current platform-detected path when unset.
Alternative — individual overrides:
CONTEXT_MODE_SESSION_DIR — session events database
CONTEXT_MODE_CONTENT_DIR — BM25 FTS5 content index
CONTEXT_MODE_STATS_DIR — process-level stats JSON files
This would allow OMP, Pi, Claude Code, and other harnesses to coexist without sharing or conflicting over storage directories.
Happy to submit a PR if this direction is agreeable.
Currently context-mode stores data in platform-specific directories under
~/.{platform}/context-mode/(e.g.~/.pi/,~/.claude/), split across two locations:~/.claude/context-mode/content/~/.claude/context-mode/sessions/For users running non-native harnesses (e.g. Oh My Pi/OMP which shares the Pi adapter path), or users who want all context-mode data in a single custom directory, there is currently no way to redirect storage.
Request: Add one or more environment variables to override storage paths.
Preferred approach — single root env var:
This would redirect all three (session events DB, content index, session stats) under that root. Falls back to the current platform-detected path when unset.
Alternative — individual overrides:
CONTEXT_MODE_SESSION_DIR— session events databaseCONTEXT_MODE_CONTENT_DIR— BM25 FTS5 content indexCONTEXT_MODE_STATS_DIR— process-level stats JSON filesThis would allow OMP, Pi, Claude Code, and other harnesses to coexist without sharing or conflicting over storage directories.
Happy to submit a PR if this direction is agreeable.