fix: isolate observer sessions to prevent polluting claude --resume list (#837)
Observer sessions created by claude-mem were appearing in the main Claude Code session picker (`claude --resume`), cluttering the list with internal plugin sessions that users never intend to resume. In one user's case: 74 observer sessions out of ~220 total (34% noise). ## Solution Set `CLAUDE_CONFIG_DIR` to `~/.claude-mem/observer-config/` when spawning observer Claude processes. This stores observer session files in a separate location, isolating them from user sessions. ## Changes 1. Added `OBSERVER_CONFIG_DIR` to paths.ts 2. Modified `createPidCapturingSpawn()` in ProcessRegistry.ts to inject `CLAUDE_CONFIG_DIR` environment variable Observer sessions now write their `.jsonl` files to: `~/.claude-mem/observer-config/projects/*/` Instead of the user's: `~/.claude/projects/*/` Fixes #832 Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -38,6 +38,10 @@ export const USER_SETTINGS_PATH = join(DATA_DIR, 'settings.json');
|
||||
export const DB_PATH = join(DATA_DIR, 'claude-mem.db');
|
||||
export const VECTOR_DB_DIR = join(DATA_DIR, 'vector-db');
|
||||
|
||||
// Isolated config directory for observer sessions (Issue #832)
|
||||
// This prevents observer sessions from appearing in `claude --resume` list
|
||||
export const OBSERVER_CONFIG_DIR = join(DATA_DIR, 'observer-config');
|
||||
|
||||
// Claude integration paths
|
||||
export const CLAUDE_SETTINGS_PATH = join(CLAUDE_CONFIG_DIR, 'settings.json');
|
||||
export const CLAUDE_COMMANDS_DIR = join(CLAUDE_CONFIG_DIR, 'commands');
|
||||
|
||||
Reference in New Issue
Block a user