You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: same project shown under 3+ paths (case + slash variants), splitting cost/session counts #217
On Windows, a single Claude Code project shows up as multiple separate "projects" in CodeBurn output because case differences and slash conventions are not normalised before grouping. This splits cost, call count, and session count across what should be one bucket.
Environment
Platform: Windows 11 Pro 26200
Node: v24.8.0
CodeBurn: 0.9.6 (npm i -g codeburn)
Shell: Git Bash (MSYS2) under VS Code
Repro
Run codeburn export --format json against a session corpus that contains Claude Code projects logged under ~/.claude/projects/ from a Windows host. The same project surfaces with three distinct keys.
Actual output (from my 30-day export)
A single repository at C:\AI_LAB\OPENCLAW produces three project rows:
The same triple-split pattern appears for every project on the box (FLIPER, HEX, OKNO, JOB_HUNT, GeminiCLI/VSCodeExtension, …). Note also that _ is being collapsed to / in the slashed variant: AI_LAB becomes AI/LAB, and AI_Experiments becomes AI/Experiments.
Expected
All three should normalise to a single canonical project, e.g. C:\AI_LAB\OPENCLAW (or a forward-slash form, but consistent and case-folded for the drive letter).
Suggested fix
When ingesting a Claude Code session path on Windows:
Lowercase the drive letter (C:\ and c:\ → c:\).
Pick one separator convention and stick to it — don't both keep \ and rewrite as / depending on which session jsonl wrote the path.
Don't replace _ with /. The ~/.claude/projects/ directory naming uses literal underscores and they're significant.
Group/normalise keys before the per-project rollup, so cost/calls/sessions are summed not split.
Related
Antigravity sessions surface as opaque ID-paths (C//Users/sam/AppData/Roaming/Claude/local/agent/mode/sessions/378983c5/.../outputs) rather than a clean "Antigravity" label. Probably a related path-resolution gap rather than an explicit normalisation bug, but worth bundling.
Happy to test a patch on the same dataset if useful.
Called from two places (lines 456 and 568) using the directory slug as the source of truth. That's how c--AI-LAB-OPENCLAW (Claude Code's slug for c:\AI_LAB\OPENCLAW) becomes c//AI/LAB/OPENCLAW. The slug is a lossy encoding — :, \, _ all collapse to -, so you can't recover the original from the directory name alone.
The good news: the canonical path is already in the data. src/types.ts:52 defines cwd?: string on JournalEntry, and every Claude Code session jsonl includes "cwd":"C:\AI_LAB\OPENCLAW" on each entry. It just isn't currently propagated up through parseSessionFile to the project rollup.
Suggested minimal fix:
In parseSessionFile, capture entry.cwd from the first entry that has one, return it as canonicalCwd alongside the session.
In the project rollup at parser.ts:454-460, prefer canonicalCwd when present; fall back to unsanitizePath(dirName) only when no jsonl entry had cwd (very old sessions).
Group projectMap by canonicalCwd.toLowerCase() (or pick a canonical case) so c:\ and C:\ collapse to one bucket.
Same shape of fix at the second call site (line 568).
Happy to test a patch on my dataset (~520 sessions, 28 projects, hits the bug 25+ times) if you want a verifier before merging.
Activity
samshennan commentedon May 5, 2026
Quick diagnosis after walking the source — root cause is in
src/parser.ts:Called from two places (lines 456 and 568) using the directory slug as the source of truth. That's how
c--AI-LAB-OPENCLAW(Claude Code's slug forc:\AI_LAB\OPENCLAW) becomesc//AI/LAB/OPENCLAW. The slug is a lossy encoding —:,\,_all collapse to-, so you can't recover the original from the directory name alone.The good news: the canonical path is already in the data.
src/types.ts:52definescwd?: stringonJournalEntry, and every Claude Code session jsonl includes"cwd":"C:\AI_LAB\OPENCLAW"on each entry. It just isn't currently propagated up throughparseSessionFileto the project rollup.Suggested minimal fix:
parseSessionFile, captureentry.cwdfrom the first entry that has one, return it ascanonicalCwdalongside the session.parser.ts:454-460, prefercanonicalCwdwhen present; fall back tounsanitizePath(dirName)only when no jsonl entry hadcwd(very old sessions).projectMapbycanonicalCwd.toLowerCase()(or pick a canonical case) soc:\andC:\collapse to one bucket.Same shape of fix at the second call site (line 568).
Happy to test a patch on my dataset (~520 sessions, 28 projects, hits the bug 25+ times) if you want a verifier before merging.
fix(parser): use Claude cwd for Windows project paths