Skip to content

Sessions from non-default CLAUDE_CONFIG_DIR profiles disappear on restart — projects scan path is hardcoded to ~/.claude/projects #74

Description

@Debilobob

Setup

I run two separate Claude Code profiles on the same machine (work / personal accounts), switched via the officially supported CLAUDE_CONFIG_DIR environment variable:

  • CLAUDE_CONFIG_DIR=~/.claude-work claude
  • CLAUDE_CONFIG_DIR=~/.claude-perso claude

Each profile writes its session transcripts to its own config dir: ~/.claude-work/projects/ and ~/.claude-perso/projects/. Sessions are launched from Switchboard using the per-project Pre-launch Command to set the variable.

Bug

While Switchboard is running, these sessions show up fine (they are tracked live). But after every restart of Switchboard, they all vanish from the sidebar.

Root cause: the projects scan path is hardcoded in main.js:

const PROJECTS_DIR = path.join(os.homedir(), '.claude', 'projects');

On cold start the sidebar is rebuilt by scanning only ~/.claude/projects, so any session written under another CLAUDE_CONFIG_DIR is never found. (Note: Additional Directories doesn't help here — it only adds --add-dir flags to the launched command, it doesn't affect where sessions are discovered.)

This looks distinct from #59, which is about cache reconciliation — here the transcripts are simply outside the scanned root.

Suggested fix

Either (or both):

  1. Respect CLAUDE_CONFIG_DIR when set in Switchboard's environment.
  2. Add a setting for additional session roots to scan (e.g. a list of config dirs / projects directories), so multi-profile setups are first-class. Since the per-project Pre-launch Command already lets users launch sessions under different profiles, discovery is the only missing half.

Current workaround

Symlinking the profile dirs to the shared one:

rsync -a ~/.claude-perso/projects/ ~/.claude/projects/
rm -rf ~/.claude-perso/projects
ln -s ~/.claude/projects ~/.claude-perso/projects

This works (resume keeps functioning through the symlink), but it merges the session lists of all accounts into one directory, which defeats part of the point of separate profiles.

Thanks for the great tool!

🤖 Investigated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions