f / f/agentlytics

Claude Code sessions from custom CLAUDE_CONFIG_DIR are not detected

Open
#38 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
577
Forks
83
PR merge metrics
No merged PRs in 30d

Description

## Problem

Claude Code supports custom config directories via the `CLAUDE_CONFIG_DIR` environment variable. This is commonly used to maintain separate profiles:

```bash
# default
claude # uses ~/.claude/

# custom profiles
CLAUDE_CONFIG_DIR=~/.claude-personal claude # uses ~/.claude-personal/
CLAUDE_CONFIG_DIR=~/.claude-work claude # uses ~/.claude-work/
CLAUDE_CONFIG_DIR=/opt/my-config claude # any arbitrary
```
Each profile stores its sessions independently under its own projects/ directory. Currently editors/claude.js only scans ~/.claude/projects/, so all sessions from custom profiles are completely missed.

The config directory can be any arbitrary path — not necessarily under ~/ or following a .claude-* naming convention — so a glob-based auto-detection alone wouldn't cover all cases.

In my case, only 135 out of 606 sessions (22%) are being detected — the remaining 471 sessions across two additional profiles are invisible to Agentlytics.

Expected behavior

Sessions from all Claude Code config directories should be discovered and included in analytics.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.